Skip to content
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

[BUG]: Rust links that included the --edition flag broke with compiler overrides #5429

Open
ojeda opened this issue Aug 28, 2023 · 0 comments

Comments

@ojeda
Copy link
Contributor

ojeda commented Aug 28, 2023

Rust shared links that included the --edition flag broke due to the edition being specified twice, which is not allowed by rustc:

error: Option 'edition' given more than once

This happens because the Compiler Overrides (#5001) adds the flag too.

For instance, we had the https://godbolt.org/z/W4P36a9h9 link in the Rust for Linux page (the link is now replaced to remove the flag).

Perhaps pre-filling flags may be a way around this? i.e. since a link would provide the flags, thus the pre-filled ones would not apply (#3100, #3765).

Though, if we change the behavior now, newer links (between the two changes) may break, since now they may require the flag and they would not have it since it was before set by the compiler override. But I think it is worth it to unbreak the older links, and avoid future issues/surprises (and we could always behave differently for the links in the middle, although it may not be worth the complexity).

Reported by Dimitri Belopopsky @ShadowMitia at https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/CE.20link.20on.20rust-for-linux.20site/near/387667888.

ojeda added a commit to Rust-for-Linux/rust-for-linux.com that referenced this issue Aug 28, 2023
Compiler Explorer added "Compiler Overrides" [1], which for Rust
include setting by default the 2021 edition. Since `rustc` does
not allow that, the old link has stopped working.

Reported to Compiler Explorer at [2].

Link: compiler-explorer/compiler-explorer#5001 [1]
Link: compiler-explorer/compiler-explorer#5429 [2]
Reported-by: Dimitri Belopopsky <dimitri@belopopsky.com>
Closes: https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/CE.20link.20on.20rust-for-linux.20site/near/387667888
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
fornwall added a commit to fornwall/advent-of-code that referenced this issue Sep 5, 2023
fornwall added a commit to fornwall/advent-of-code that referenced this issue Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant