Skip to content

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

@ojeda

Description

@ojeda

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions