This repository has been archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Adds 'rustc fails to detect duplicate switch cases due to integer overrflow' ICE #3
Merged
+11
−0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rflow' ICE Reference: rust-lang/rust#13727
steveklabnik
added a commit
that referenced
this pull request
Oct 23, 2015
Adds 'rustc fails to detect duplicate switch cases due to integer overrflow' ICE
Thank you! 👍 💯 |
github-actions bot
pushed a commit
that referenced
this pull request
Jul 29, 2021
=== stdout === DefId(0:7 ~ rust_out[6150]::{impl#0}::print): Thir { arms: [ Arm { pattern: Pat { ty: (&&str,), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Leaf { subpatterns: [ FieldPat { field: field[0], pattern: Pat { ty: &&str, span: <anon>:6:49: 6:50 (#4), kind: Binding { mutability: Not, name: "arg0", mode: ByValue, var: HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 29, }, ty: &&str, subpattern: None, is_primary: true, }, }, }, ], }, }, guard: None, body: e36, lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 31, }, ), scope: Node(31), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), }, Arm { pattern: Pat { ty: &Foo, span: <anon>:6:13: 6:24 (#0), kind: Deref { subpattern: Pat { ty: Foo, span: <anon>:6:14: 6:24 (#0), kind: Leaf { subpatterns: [ FieldPat { field: field[0], pattern: Pat { ty: str, span: <anon>:6:18: 6:23 (#0), kind: Binding { mutability: Not, name: "s", mode: ByRef( Shared, ), var: HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 6, }, ty: &str, subpattern: None, is_primary: true, }, }, }, ], }, }, }, }, guard: None, body: e50, lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 9, }, ), scope: Node(9), span: <anon>:6:13: 6:51 (#0), }, ], exprs: [ Expr { ty: &Foo, temp_lifetime: Some( Node(57), ), span: <anon>:5:15: 5:19 (#0), kind: VarRef { id: HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 2, }, }, }, Expr { ty: &Foo, temp_lifetime: Some( Node(57), ), span: <anon>:5:15: 5:19 (#0), kind: Scope { region_scope: Node(4), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 4, }, ), value: e0, }, }, Expr { ty: for<'r> fn(std::fmt::Arguments<'r>) {std::io::_print}, temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:9: 98:27 (#3), kind: Literal { literal: Const { ty: for<'r> fn(std::fmt::Arguments<'r>) {std::io::_print}, val: Value( Scalar( <ZST>, ), ), }, user_ty: None, const_id: None, }, }, Expr { ty: for<'r> fn(std::fmt::Arguments<'r>) {std::io::_print}, temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:9: 98:27 (#3), kind: Scope { region_scope: Node(13), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 13, }, ), value: e2, }, }, Expr { ty: fn(&[&'static str], &[std::fmt::ArgumentV1]) -> std::fmt::Arguments {std::fmt::Arguments::new_v1}, temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Literal { literal: Const { ty: fn(&[&'static str], &[std::fmt::ArgumentV1]) -> std::fmt::Arguments {std::fmt::Arguments::new_v1}, val: Value( Scalar( <ZST>, ), ), }, user_ty: Some( Canonical { max_universe: U0, variables: [ CanonicalVarInfo { kind: Region( U0, ), }, CanonicalVarInfo { kind: Region( U0, ), }, ], value: TypeOf( DefId(2:8955 ~ core[734c]::fmt::{impl#3}::new_v1), UserSubsts { substs: [ ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(0) }), ], user_self_ty: Some( UserSelfTy { impl_def_id: DefId(2:8953 ~ core[734c]::fmt::{impl#3}), self_ty: std::fmt::Arguments<'_>, }, ), }, ), }, ), const_id: None, }, }, Expr { ty: fn(&[&'static str], &[std::fmt::ArgumentV1]) -> std::fmt::Arguments {std::fmt::Arguments::new_v1}, temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Node(20), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 20, }, ), value: e4, }, }, Expr { ty: &str, temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Literal { literal: Const { ty: &str, val: Value( Slice { data: Allocation { bytes: [ 102, 34, ], relocations: Relocations( SortedMap { data: [], }, ), init_mask: InitMask { blocks: [ 3, ], len: Size { raw: 2, }, }, align: Align { pow2: 0, }, mutability: Not, extra: (), }, start: 0, end: 2, }, ), }, user_ty: None, const_id: None, }, }, Expr { ty: &str, temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Scope { region_scope: Node(21), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 21, }, ), value: e6, }, }, Expr { ty: &str, temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Literal { literal: Const { ty: &str, val: Value( Slice { data: Allocation { bytes: [ 34, 10, ], relocations: Relocations( SortedMap { data: [], }, ), init_mask: InitMask { blocks: [ 3, ], len: Size { raw: 2, }, }, align: Align { pow2: 0, }, mutability: Not, extra: (), }, start: 0, end: 2, }, ), }, user_ty: None, const_id: None, }, }, Expr { ty: &str, temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Scope { region_scope: Node(22), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 22, }, ), value: e8, }, }, Expr { ty: [&str; 2], temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Array { fields: [ e7, e9, ], }, }, Expr { ty: [&str; 2], temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Scope { region_scope: Node(23), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 23, }, ), value: e10, }, }, Expr { ty: &[&str; 2], temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Borrow { borrow_kind: Shared, arg: e11, }, }, Expr { ty: [&str; 2], temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Deref { arg: e12, }, }, Expr { ty: &[&str; 2], temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Borrow { borrow_kind: Shared, arg: e13, }, }, Expr { ty: &[&str], temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Pointer { cast: Unsize, source: e14, }, }, Expr { ty: &[&str], temp_lifetime: Some( Node(52), ), span: <anon>:6:38: 6:47 (#0), kind: Scope { region_scope: Node(24), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 24, }, ), value: e15, }, }, Expr { ty: &str, temp_lifetime: Some( Node(52), ), span: <anon>:6:49: 6:50 (#0), kind: VarRef { id: HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 6, }, }, }, Expr { ty: &str, temp_lifetime: Some( Node(52), ), span: <anon>:6:49: 6:50 (#0), kind: Scope { region_scope: Node(26), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 26, }, ), value: e17, }, }, Expr { ty: &&str, temp_lifetime: Some( Node(52), ), span: <anon>:6:49: 6:50 (#0), kind: Borrow { borrow_kind: Shared, arg: e18, }, }, Expr { ty: &&str, temp_lifetime: Some( Node(52), ), span: <anon>:6:49: 6:50 (#0), kind: Scope { region_scope: Node(27), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 27, }, ), value: e19, }, }, Expr { ty: (&&str,), temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Tuple { fields: [ e20, ], }, }, Expr { ty: (&&str,), temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Node(28), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 28, }, ), value: e21, }, }, Expr { ty: for<'b> fn(&'b &str, for<'r, 's, 't0> fn(&'r &str, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> std::fmt::ArgumentV1<'b> {std::fmt::ArgumentV1::new::<&str>}, temp_lifetime: Some( Node(47), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Literal { literal: Const { ty: for<'b> fn(&'b &str, for<'r, 's, 't0> fn(&'r &str, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> std::fmt::ArgumentV1<'b> {std::fmt::ArgumentV1::new::<&str>}, val: Value( Scalar( <ZST>, ), ), }, user_ty: Some( Canonical { max_universe: U0, variables: [ CanonicalVarInfo { kind: Region( U0, ), }, CanonicalVarInfo { kind: Ty( General( U0, ), ), }, CanonicalVarInfo { kind: Region( U0, ), }, ], value: TypeOf( DefId(2:8948 ~ core[734c]::fmt::{impl#2}::new), UserSubsts { substs: [ ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(0) }), ^1, ], user_self_ty: Some( UserSelfTy { impl_def_id: DefId(2:8946 ~ core[734c]::fmt::{impl#2}), self_ty: std::fmt::ArgumentV1<'_>, }, ), }, ), }, ), const_id: None, }, }, Expr { ty: for<'b> fn(&'b &str, for<'r, 's, 't0> fn(&'r &str, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> std::fmt::ArgumentV1<'b> {std::fmt::ArgumentV1::new::<&str>}, temp_lifetime: Some( Node(47), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Node(38), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 38, }, ), value: e23, }, }, Expr { ty: &&str, temp_lifetime: Some( Node(47), ), span: <anon>:6:49: 6:50 (#4), kind: VarRef { id: HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 29, }, }, }, Expr { ty: &str, temp_lifetime: Some( Node(47), ), span: <anon>:6:49: 6:50 (#4), kind: Deref { arg: e25, }, }, Expr { ty: &&str, temp_lifetime: Some( Node(47), ), span: <anon>:6:49: 6:50 (#4), kind: Borrow { borrow_kind: Shared, arg: e26, }, }, Expr { ty: &&str, temp_lifetime: Some( Node(47), ), span: <anon>:6:49: 6:50 (#4), kind: Scope { region_scope: Node(40), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 40, }, ), value: e27, }, }, Expr { ty: for<'r, 's, 't0> fn(&'r &str, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&str as std::fmt::Display>::fmt}, temp_lifetime: Some( Node(47), ), span: <anon>:6:49: 6:50 (#4), kind: Literal { literal: Const { ty: for<'r, 's, 't0> fn(&'r &str, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> {<&str as std::fmt::Display>::fmt}, val: Value( Scalar( <ZST>, ), ), }, user_ty: None, const_id: None, }, }, Expr { ty: for<'r, 's, 't0> fn(&'r &str, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, temp_lifetime: Some( Node(47), ), span: <anon>:6:49: 6:50 (#4), kind: Pointer { cast: ReifyFnPointer, source: e29, }, }, Expr { ty: for<'r, 's, 't0> fn(&'r &str, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>, temp_lifetime: Some( Node(47), ), span: <anon>:6:49: 6:50 (#4), kind: Scope { region_scope: Node(45), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 45, }, ), value: e30, }, }, Expr { ty: std::fmt::ArgumentV1, temp_lifetime: Some( Node(47), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Call { ty: for<'b> fn(&'b &str, for<'r, 's, 't0> fn(&'r &str, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error>) -> std::fmt::ArgumentV1<'b> {std::fmt::ArgumentV1::new::<&str>}, fun: e24, args: [ e28, e31, ], from_hir_call: true, fn_span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), }, }, Expr { ty: std::fmt::ArgumentV1, temp_lifetime: Some( Node(47), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Node(46), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 46, }, ), value: e32, }, }, Expr { ty: [std::fmt::ArgumentV1; 1], temp_lifetime: Some( Node(47), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Array { fields: [ e33, ], }, }, Expr { ty: [std::fmt::ArgumentV1; 1], temp_lifetime: Some( Node(47), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Node(47), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 47, }, ), value: e34, }, }, Expr { ty: [std::fmt::ArgumentV1; 1], temp_lifetime: Some( Node(47), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Destruction(47), lint_level: Inherited, value: e35, }, }, Expr { ty: [std::fmt::ArgumentV1; 1], temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Match { scrutinee: e22, arms: [ a0, ], }, }, Expr { ty: [std::fmt::ArgumentV1; 1], temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Node(48), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 48, }, ), value: e37, }, }, Expr { ty: &[std::fmt::ArgumentV1; 1], temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Borrow { borrow_kind: Shared, arg: e38, }, }, Expr { ty: [std::fmt::ArgumentV1; 1], temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Deref { arg: e39, }, }, Expr { ty: &[std::fmt::ArgumentV1; 1], temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Borrow { borrow_kind: Shared, arg: e40, }, }, Expr { ty: &[std::fmt::ArgumentV1], temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Pointer { cast: Unsize, source: e41, }, }, Expr { ty: &[std::fmt::ArgumentV1], temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Node(49), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 49, }, ), value: e42, }, }, Expr { ty: std::fmt::Arguments, temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Call { ty: fn(&[&'static str], &[std::fmt::ArgumentV1]) -> std::fmt::Arguments {std::fmt::Arguments::new_v1}, fun: e5, args: [ e16, e43, ], from_hir_call: true, fn_span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), }, }, Expr { ty: std::fmt::Arguments, temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:28: 98:61 (#4), kind: Scope { region_scope: Node(50), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 50, }, ), value: e44, }, }, Expr { ty: (), temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:9: 98:62 (#3), kind: Call { ty: for<'r> fn(std::fmt::Arguments<'r>) {std::io::_print}, fun: e3, args: [ e45, ], from_hir_call: true, fn_span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:9: 98:62 (#3), }, }, Expr { ty: (), temp_lifetime: Some( Node(52), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:98:9: 98:62 (#3), kind: Scope { region_scope: Node(51), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 51, }, ), value: e46, }, }, Expr { ty: (), temp_lifetime: Some( Node(54), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:97:23: 99:6 (#3), kind: Block { body: Block { targeted_by_break: false, region_scope: Node(53), opt_destruction_scope: None, span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:97:23: 99:6 (#3), stmts: [ s0, ], expr: None, safety_mode: Safe, }, }, }, Expr { ty: (), temp_lifetime: Some( Node(54), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:97:23: 99:6 (#3), kind: Scope { region_scope: Node(54), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 54, }, ), value: e48, }, }, Expr { ty: (), temp_lifetime: Some( Node(54), ), span: /rustc/b70888601af92f6cdc0364abab3446e418b91d36/library/std/src/macros.rs:97:23: 99:6 (#3), kind: Scope { region_scope: Destruction(54), lint_level: Inherited, value: e49, }, }, Expr { ty: (), temp_lifetime: Some( Node(57), ), span: <anon>:5:9: 7:10 (#0), kind: Match { scrutinee: e1, arms: [ a1, ], }, }, Expr { ty: (), temp_lifetime: Some( Node(57), ), span: <anon>:5:9: 7:10 (#0), kind: Scope { region_scope: Node(55), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 55, }, ), value: e51, }, }, Expr { ty: (), temp_lifetime: Some( Node(57), ), span: <anon>:4:21: 8:6 (#0), kind: Block { body: Block { targeted_by_break: false, region_scope: Node(56), opt_destruction_scope: None, span: <anon>:4:21: 8:6 (#0), stmts: [], expr: Some( e52, ), safety_mode: Safe, }, }, }, Expr { ty: (), temp_lifetime: Some( Node(57), ), span: <anon>:4:21: 8:6 (#0), kind: Scope { region_scope: Node(57), lint_level: Explicit( HirId { owner: DefId(0:7 ~ rust_out[6150]::{impl#0}::print), local_id: 57, }, ), value: e53, }, }, Expr { ty: (), temp_lifetime: Some( Node(57), ), span: <anon>:4:21: 8:6 (#0), kind: Scope { region_scope: Destruction(57), lint_level: Inherited, value: e54, }, }, ], stmts: [ Stmt { kind: Expr { scope: Node(52), expr: e47, }, opt_destruction_scope: Some( Destruction(52), ), }, ], } DefId(0:8 ~ rust_out[6150]::main): Thir { arms: [], exprs: [ Expr { ty: (), temp_lifetime: Some( Node(2), ), span: <anon>:11:11: 11:13 (#0), kind: Block { body: Block { targeted_by_break: false, region_scope: Node(1), opt_destruction_scope: None, span: <anon>:11:11: 11:13 (#0), stmts: [], expr: None, safety_mode: Safe, }, }, }, Expr { ty: (), temp_lifetime: Some( Node(2), ), span: <anon>:11:11: 11:13 (#0), kind: Scope { region_scope: Node(2), lint_level: Explicit( HirId { owner: DefId(0:8 ~ rust_out[6150]::main), local_id: 2, }, ), value: e0, }, }, Expr { ty: (), temp_lifetime: Some( Node(2), ), span: <anon>:11:11: 11:13 (#0), kind: Scope { region_scope: Destruction(2), lint_level: Inherited, value: e1, }, }, ], stmts: [], } === stderr === warning: struct is never constructed: `Foo` --> <anon>:1:8 | 1 | struct Foo(pub str); | ^^^ | = note: `#[warn(dead_code)]` on by default warning: associated function is never used: `print` --> <anon>:4:8 | 4 | fn print(&self) { | ^^^^^ warning: 2 warnings emitted ==============
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference: rust-lang/rust#13727