Skip to content

Cryptic error when unable to write target file due to permission problems #7579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
absurdhero opened this issue Jul 4, 2013 · 2 comments
Closed
Labels
A-diagnostics Area: Messages for errors, warnings, and lints O-macos Operating system: macOS

Comments

@absurdhero
Copy link

On Mac OS, I was compiling a source file in a directory where I didn't have permission to create a new file like so:

$ rustc -o hello hello.rs
error: Could not write output: x86_64-a

It wasn't clear that this was an file IO issue and I could find no mention of this error in docs. The subject of the message was misleading and it looked to me like a code generation error due to the mention of "x86_64-a".

The error would be more clear if it printed the name of the file it was attempting to write instead of the architecture.

@huonw
Copy link
Member

huonw commented Sep 10, 2013

Triage: Appears to be slightly better, but I can only test on linux:

$ mkdir noperm && cd noperm/
$ echo 'fn main() {}' > test.rs
$ chmod -w .
$ rustc test.rs
error: Could not write output: Error opening output file 'test.o'

@huonw
Copy link
Member

huonw commented Sep 10, 2013

@pnkfelix says that the output is the same on OSX as on Linux, so I'm closing this. Feel free to reopen with more details about how to recreate the directory/file structure if you can still reproduce it.

@huonw huonw closed this as completed Sep 10, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 17, 2022
…hearth

Don't lint `if_same_then_else` with `if let` conditions

fixes rust-lang#7579

changelog: Don't lint `if_same_then_else` with `if let` conditions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints O-macos Operating system: macOS
Projects
None yet
Development

No branches or pull requests

2 participants