-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
#[deriving(Encodable)]
crashes rustc --pretty expanded
#12685
Comments
klutzy
added a commit
to klutzy/rust
that referenced
this issue
Apr 16, 2014
bors
added a commit
that referenced
this issue
Apr 16, 2014
\o/ maybe now I'll be able to pretty-print rustc! |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
May 2, 2024
Threadlocal_initializer_can_be_made_const will not trigger for unreachable initializers This commit introduces a check to ensure that the lint won't trigger when the initializer is unreachable, such as: ``` thread_local! { static STATE: Cell<usize> = panic!(); } ``` This is achieved by looking at the unpeeled initializer expression and ensuring that the parent macro is not `panic!()`, `todo!()`, `unreachable!()`, `unimplemented!()`. fixes rust-lang#12637 changelog: [`threadlocal_initializer_can_be_made_const`] will no longer trigger on `unreachable` macros.
Zalathar
added a commit
to Zalathar/rust
that referenced
this issue
Jun 4, 2024
This was an ancient regression test for rust-lang#12685, caused by `-Zunpretty=expanded` crashing on certain code produced by `#[derive(RustcEncodable)]`.
Zalathar
added a commit
to Zalathar/rust
that referenced
this issue
Jun 4, 2024
This was an ancient regression test for rust-lang#12685, caused by `-Zunpretty=expanded` crashing on certain code produced by `#[derive(RustcEncodable)]`.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jun 4, 2024
Remove `tests/run-make-fulldeps/pretty-expanded` This was an ancient regression test for rust-lang#12685, caused by `-Zunpretty=expanded` crashing on certain code produced by `#[derive(RustcEncodable)]`. Given that this test predates `//@ pretty-expanded` tests, and was tied to ancient implementation details of the pretty-printer and `#[derive(RustcEncodable)]` (which the test no longer even uses), I think we can safely delete it. --- Spotted via rust-lang#125948.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jun 4, 2024
Rollup merge of rust-lang#125973 - Zalathar:pretty, r=lqd Remove `tests/run-make-fulldeps/pretty-expanded` This was an ancient regression test for rust-lang#12685, caused by `-Zunpretty=expanded` crashing on certain code produced by `#[derive(RustcEncodable)]`. Given that this test predates `//@ pretty-expanded` tests, and was tied to ancient implementation details of the pretty-printer and `#[derive(RustcEncodable)]` (which the test no longer even uses), I think we can safely delete it. --- Spotted via rust-lang#125948.
lcnr
pushed a commit
to lcnr/rust
that referenced
this issue
Jun 12, 2024
This was an ancient regression test for rust-lang#12685, caused by `-Zunpretty=expanded` crashing on certain code produced by `#[derive(RustcEncodable)]`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While this code compiles fine and works well against the encoder,
rustc --pretty expanded
gives this ICE:Deriving is certainly generating an AST which is fine for trans but not fine for the pretty printer. It turns out that
#[deriving(Encodable)]
creates anFnBlockExpr
node with a multi-statementBlock
(normally expected to contain a singleExprBlock
node), which triggers a couple of assertions.The text was updated successfully, but these errors were encountered: