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

Rollup of 2 pull requests #57513

Closed
wants to merge 17 commits into from
Closed

Rollup of 2 pull requests #57513

wants to merge 17 commits into from

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jan 11, 2019

Successful merges:

Failed merges:

r? @ghost

Centril and others added 17 commits December 31, 2018 03:36
…nikomatsakis

Stabilize `let` bindings and destructuring in constants and const fn

r? @Centril

This PR stabilizes the following features in constants and `const` functions:

* irrefutable destructuring patterns (e.g. `const fn foo((x, y): (u8, u8)) { ... }`)
* `let` bindings (e.g. `let x = 1;`)
* mutable `let` bindings (e.g. `let mut x = 1;`)
* assignment (e.g. `x = y`) and assignment operator (e.g. `x += y`) expressions, even where the assignment target is a projection (e.g. a struct field or index operation like `x[3] = 42`)
* expression statements (e.g. `3;`)

This PR does explicitly *not* stabilize:

* mutable references (i.e. `&mut T`)
* dereferencing mutable references
* refutable patterns (e.g. `Some(x)`)
* operations on `UnsafeCell` types (as that would need raw pointers and mutable references and such, not because it is explicitly forbidden. We can't explicitly forbid it as such values are OK as long as they aren't mutated.)
* We are not stabilizing `let` bindings in constants that use `&&` and `||` short circuiting operations. These are treated as `&` and `|` inside `const` and `static` items right now. If we stopped treating them as `&` and `|` after stabilizing `let` bindings, we'd break code like `let mut x = false; false && { x = true; false };`. So to use `let` bindings in constants you need to change `&&` and `||` to `&` and `|` respectively.
…li-obk

Const-stabilize `const_int_ops` + `const_ip`

r? @oli-obk

I've added T-lang since this affects intrinsics and the operational semantics of Rust's `const fn` fragment.
This PR depends on rust-lang#57105 but the FCP intent does not.

## Stable APIs proposed for constification

+ `const_int_ops`:
    + `count_ones`
    + `count_zeros`
    + `leading_zeros`
    + `trailing_zeros`
    + `swap_bytes`
    + `from_be`
    + `from_le`
    + `to_be`
    + `to_le`
+ `const_ip`
    + `Ipv4Addr::new`

## Unstable APIs constified

+ `const_int_conversion`:
    + `reverse_bits`
@Centril
Copy link
Contributor Author

Centril commented Jan 11, 2019

@bors r+ p=2

@bors
Copy link
Contributor

bors commented Jan 11, 2019

📌 Commit 713551c has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 11, 2019
@bors
Copy link
Contributor

bors commented Jan 11, 2019

⌛ Testing commit 713551c with merge d6753e808df6f78f5e46c67f4490c1d0827be96d...

@bors
Copy link
Contributor

bors commented Jan 11, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-nopt of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[01:31:44] 
[01:31:44] ---- [ui (nll)] ui/check-static-values-constraints.rs stdout ----
[01:31:44] diff of stderr:
[01:31:44] 
[01:31:44] 13 LL | static STATIC11: Box<MyOwned> = box MyOwned;
[01:31:44] 14    |                                 ^^^^^^^^^^^ allocation not allowed in statics
[01:31:44] 15 
[01:31:44] + error[E0019]: static contains unimplemented expression type
[01:31:44] +    |
[01:31:44] +    |
[01:31:44] + LL | static STATIC11: Box<MyOwned> = box MyOwned;
[01:31:44] + 
[01:31:44] + 
[01:31:44] 16 error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:90:32
[01:31:44] 18    |
[01:31:44] 18    |
[01:31:44] 19 LL |     field2: SafeEnum::Variant4("str".to_string())
[01:31:44] 
[01:31:44] 21 
[01:31:44] 22 error[E0010]: allocations are not allowed in statics
[01:31:44] -   --> $DIR/check-static-values-constraints.rs:94:5
[01:31:44] -   --> $DIR/check-static-values-constraints.rs:94:5
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:95:5
[01:31:44] 24    |
[01:31:44] 25 LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
[01:31:44] 26    |     ^^^^^^^^^^^ allocation not allowed in statics
[01:31:44] 27 
[01:31:44] 27 
[01:31:44] + error[E0019]: static contains unimplemented expression type
[01:31:44] +    |
[01:31:44] +    |
[01:31:44] + LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
[01:31:44] + 
[01:31:44] 28 error[E0010]: allocations are not allowed in statics
[01:31:44] -   --> $DIR/check-static-values-constraints.rs:95:5
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:97:5
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:97:5
[01:31:44] 30    |
[01:31:44] 31 LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
[01:31:44] 32    |     ^^^^^^^^^^^ allocation not allowed in statics
[01:31:44] 33 
[01:31:44] 33 
[01:31:44] + error[E0019]: static contains unimplemented expression type
[01:31:44] +    |
[01:31:44] +    |
[01:31:44] + LL |     box MyOwned, //~ ERROR allocations are not allowed in statics
[01:31:44] + 
[01:31:44] 34 error[E0010]: allocations are not allowed in statics
[01:31:44] -   --> $DIR/check-static-values-constraints.rs:99:6
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:102:6
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:102:6
[01:31:44] 36    |
[01:31:44] 37 LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
[01:31:44] 38    |      ^^^^^^^^^^^ allocation not allowed in statics
[01:31:44] 39 
[01:31:44] 39 
[01:31:44] + error[E0019]: static contains unimplemented expression type
[01:31:44] +    |
[01:31:44] +    |
[01:31:44] + LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
[01:31:44] + 
[01:31:44] 40 error[E0010]: allocations are not allowed in statics
[01:31:44] -   --> $DIR/check-static-values-constraints.rs:100:6
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:104:6
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:104:6
[01:31:44] 42    |
[01:31:44] 43 LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
[01:31:44] 44    |      ^^^^^^^^^^^ allocation not allowed in statics
[01:31:44] 45 
[01:31:44] 45 
[01:31:44] + error[E0019]: static contains unimplemented expression type
[01:31:44] +    |
[01:31:44] +    |
[01:31:44] + LL |     &box MyOwned, //~ ERROR allocations are not allowed in statics
[01:31:44] + 
[01:31:44] 46 error[E0010]: allocations are not allowed in statics
[01:31:44] -   --> $DIR/check-static-values-constraints.rs:106:5
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:111:5
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:111:5
[01:31:44] 48    |
[01:31:44] 49 LL |     box 3;
[01:31:44] 50    |     ^^^^^ allocation not allowed in statics
[01:31:44] 
[01:31:44] 51 
[01:31:44] + error[E0019]: static contains unimplemented expression type
[01:31:44] +    |
[01:31:44] + LL |     box 3;
[01:31:44] +    |         ^
[01:31:44] + 
[01:31:44] + 
[01:31:44] 52 error[E0507]: cannot move out of static item
[01:31:44] -   --> $DIR/check-static-values-constraints.rs:110:45
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:116:45
[01:31:44] 54    |
[01:31:44] 55 LL |     let y = { static x: Box<isize> = box 3; x };
[01:31:44] 
[01:31:44] 59    |                                             help: consider borrowing here: `&x`
[01:31:44] 60 
[01:31:44] 61 error[E0010]: allocations are not allowed in statics
[01:31:44] 61 error[E0010]: allocations are not allowed in statics
[01:31:44] -   --> $DIR/check-static-values-constraints.rs:110:38
[01:31:44] +   --> $DIR/check-static-values-constraints.rs:116:38
[01:31:44] 63    |
[01:31:44] 64 LL |     let y = { static x: Box<isize> = box 3; x };
[01:31:44] 65    |                                      ^^^^^ allocation not allowed in statics
[01:31:44] 66 
[01:31:44] - error: aborting due to 10 previous errors
[01:31:44] - error: aborting due to 10 previous errors
[01:31:44] + error[E0019]: static contains unimplemented expression type
[01:31:44] +    |
[01:31:44] +    |
[01:31:44] + LL |     let y = { static x: Box<isize> = box 3; x };
[01:31:44] 68 
[01:31:44] - Some errors occurred: E0010, E0015, E0493, E0507.
[01:31:44] + error: aborting due to 17 previous errors
[01:31:44] + 
[01:31:44] + 
[01:31:44] + Some errors occurred: E0010, E0015, E0019, E0493, E0507.
[01:31:44] 70 For more information about an error, try `rustc --explain E0010`.
[01:31:44] 71 
[01:31:44] 
[01:31:44] 
[01:31:44] The actual stderr differed from the expected stderr.
[01:31:44] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/check-static-values-constraints.nll/check-static-values-constraints.nll.stderr
[01:31:44] To update references, rerun the tests and pass the `--bless` flag
[01:31:44] To only update this specific test, also pass `--test-args check-static-values-constraints.rs`
[01:31:44] error: 1 errors occurred comparing output.
[01:31:44] status: exit code: 1
[01:31:44] status: exit code: 1
[01:31:44] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/check-static-values-constraints.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/check-static-values-constraints.nll/a" "-Zborrowck=migrate" "-Ztwo-phase-borrows" "-Crpath" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/check-static-values-constraints.nll/auxiliary" "-A" "unused"
[01:31:44] ------------------------------------------
[01:31:44] 
[01:31:44] ------------------------------------------
[01:31:44] stderr:
[01:31:44] stderr:
[01:31:44] ------------------------------------------
[01:31:44] {"message":"destructors cannot be evaluated at compile-time","code":{"code":"E0493","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":1896,"byte_end":2084,"line_start":65,"line_end":67,"column_start":43,"column_end":81,"is_primary":true,"text":[{"text":"                                        ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),","highlight_start":43,"highlight_end":91},{"text":"//~^ ERROR destructors cannot be evaluated at compile-time","highlight_start":1,"highlight_end":59},{"text":"                                                     field2: SafeEnum::Variant1}};","highlight_start":1,"highlight_end":81}],"label":"statics cannot evaluate destructors","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0493]: destructors cannot be evaluated at compile-time\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:65:43\n   |\nLL |                                           ..SafeStruct{field1: SafeEnum::Variant3(WithDtor),\n   |  ___________________________________________^\nLL | | //~^ ERROR destructors cannot be evaluated at compile-time\nLL | |                                                      field2: SafeEnum::Variant1}};\n   | |________________________________________________________________________________^ statics cannot evaluate destructors\n\n"}
[01:31:44] {"message":"allocations are not allowed in statics","code":{"code":"E0010","explanation":"\nThe value of statics and constants must be known at compile time, and they live\nfor the entire lifetime of a program. Creating a boxed value allocates memory on\nthe heap at runtime, and therefore cannot be done at compile time. Erroneous\ncode example:\n\n```compile_fail,E0010\n#![feature(box_syntax)]\n\nconst CON : Box<i32> = box 0;\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":2264,"byte_end":2275,"line_start":79,"line_end":79,"column_start":33,"column_end":44,"is_primary":true,"text":[{"text":"static STATIC11: Box<MyOwned> = box MyOwned;","highlight_start":33,"highlight_end":44}],"label":"allocation not allowed in statics","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0010]: allocations are not allowed in statics\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:79:33\n   |\nLL | static STATIC11: Box<MyOwned> = box MyOwned;\n   |                                 ^^^^^^^^^^^ allocation not allowed in statics\n\n"}
[01:31:44] {"message":"static contains unimplemented expression type","code":{"code":"E0019","explanation":"\nA function call isn't allowed in the const's initialization expression\nbecause the expression's value must be known at compile-time. Erroneous code\nexample:\n\n```compile_fail\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn test(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    const A: i32 = FOO.test(); // You can't call Test::func() here!\n}\n```\n\nRemember: you can't use a function call inside a const's initialization\nexpression! However, you can totally use it anywhere else:\n\n```\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn func(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    FOO.func(); // here is good\n    let x = FOO.func(); // or even here!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":2268,"byte_end":2275,"line_start":79,"line_end":79,"column_start":37,"column_end":44,"is_primary":true,"text":[{"text":"static STATIC11: Box<MyOwned> = box MyOwned;","highlight_start":37,"highlight_end":44}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0019]: static contains unimplemented expression type\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:79:37\n   |\nLL | static STATIC11: Box<MyOwned> = box MyOwned;\n   |                                     ^^^^^^^\n\n"}
[01:31:44] {"message":"calls in statics are limited to constant functions, tuple structs and tuple variants","code":{"code":"E0015","explanation":"\nThe only functions that can be called in static or constant expressions are\n`const` functions, and struct/enum constructors. `const` functions are only\navailable on a nightly compiler. Rust currently does not support more general\ncompile-time function execution.\n\n```\nconst FOO: Option<u8> = Some(1); // enum constructor\nstruct Bar {x: u8}\nconst BAR: Bar = Bar {x: 1}; // struct constructor\n```\n\nSee [RFC 911] for more details on the design of `const fn`s.\n\n[RFC 911]: https://github.com/rust-lang/rfcs/blob/master/text/0911-const-fn.md\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":2704,"byte_end":2721,"line_start":90,"line_end":90,"column_start":32,"column_end":49,"is_primary":true,"text":[{"text":"    field2: SafeEnum::Variant4(\"str\".to_string())","highlight_start":32,"highlight_end":49}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:90:32\n   |\nLL |     field2: SafeEnum::Variant4(\"str\".to_string())\n   |                                ^^^^^^^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"allocations are not allowed in statics","code":{"code":"E0010","explanation":"\nThe value of statics and constants must be known at compile time, and they live\nfor the entire lifetime of a program. Creating a boxed value allocates memory on\nthe heap at runtime, and therefore cannot be done at compile time. Erroneous\ncode example:\n\n```compile_fail,E0010\n#![feature(box_syntax)]\n\nconst CON : Box<i32> = box 0;\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":2839,"byte_end":2850,"line_start":95,"line_end":95,"column_start":5,"column_end":16,"is_primary":true,"text":[{"text":"    box MyOwned, //~ ERROR allocations are not allowed in statics","highlight_start":5,"highlight_end":16}],"label":"allocation not allowed in statics","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0010]: allocations are not allowed in statics\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:95:5\n   |\nLL |     box MyOwned, //~ ERROR allocations are not allowed in statics\n   |     ^^^^^^^^^^^ allocation not allowed in statics\n\n"}
[01:31:44] {"message":"static contains unimplemented expression type","code":{"code":"E0019","explanation":"\nA function call isn't allowed in the const's initialization expression\nbecause the expression's value must be known at compile-time. Erroneous code\nexample:\n\n```compile_fail\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn test(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    const A: i32 = FOO.test(); // You can't call Test::func() here!\n}\n```\n\nRemember: you can't use a function call inside a const's initialization\nexpression! However, you can totally use it anywhere else:\n\n```\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn func(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    FOO.func(); // here is good\n    let x = FOO.func(); // or even here!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":2843,"byte_end":2850,"line_start":95,"line_end":95,"column_start":9,"column_end":16,"is_primary":true,"text":[{"text":"    box MyOwned, //~ ERROR allocations are not allowed in statics","highlight_start":9,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0019]: static contains unimplemented expression type\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:95:9\n   |\nLL |     box MyOwned, //~ ERROR allocations are not allowed in statics\n   |         ^^^^^^^\n\n"}
[01:31:44] {"message":"allocations are not allowed in statics","code":{"code":"E0010","explanation":"\nThe value of statics and constants must be known at compile time, and they live\nfor the entire lifetime of a program. Creating a boxed value allocates memory on\nthe heap at runtime, and therefore cannot be done at compile time. Erroneous\ncode example:\n\n```compile_fail,E0010\n#![feature(box_syntax)]\n\nconst CON : Box<i32> = box 0;\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":2954,"byte_end":2965,"line_start":97,"line_end":97,"column_start":5,"column_end":16,"is_primary":true,"text":[{"text":"    box MyOwned, //~ ERROR allocations are not allowed in statics","highlight_start":5,"highlight_end":16}],"label":"allocation not allowed in statics","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0010]: allocations are not allowed in statics\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:97:5\n   |\nLL |     box MyOwned, //~ ERROR allocations are not allowed in statics\n   |     ^^^^^^^^^^^ allocation not allowed in statics\n\n"}
[01:31:44] {"message":"static contains unimplemented expression type","code":{"code":"E0019","explanation":"\nA function call isn't allowed in the const's initialization expression\nbecause the expression's value must be known at compile-time. Erroneous code\nexample:\n\n```compile_fail\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn test(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    const A: i32 = FOO.test(); // You can't call Test::func() here!\n}\n```\n\nRemember: you can't use a function call inside a const's initialization\nexpression! However, you can totally use it anywhere else:\n\n```\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn func(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    FOO.func(); // here is good\n    let x = FOO.func(); // or even here!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":2958,"byte_end":2965,"line_start":97,"line_end":97,"column_start":9,"column_end":16,"is_primary":true,"text":[{"text":"    box MyOwned, //~ ERROR allocations are not allowed in statics","highlight_start":9,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0019]: static contains unimplemented expression type\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:97:9\n   |\nLL |     box MyOwned, //~ ERROR allocations are not allowed in statics\n   |         ^^^^^^^\n\n"}
[01:31:44] {"message":"allocations are not allowed in statics","code":{"code":"E0010","explanation":"\nThe value of statics and constants must be known at compile time, and they live\nfor the entire lifetime of a program. Creating a boxed value allocates memory on\nthe heap at runtime, and therefore cannot be done at compile time. Erroneous\ncode example:\n\n```compile_fail,E0010\n#![feature(box_syntax)]\n\nconst CON : Box<i32> = box 0;\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3142,"byte_end":3153,"line_start":102,"line_end":102,"column_start":6,"column_end":17,"is_primary":true,"text":[{"text":"    &box MyOwned, //~ ERROR allocations are not allowed in statics","highlight_start":6,"highlight_end":17}],"label":"allocation not allowed in statics","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0010]: allocations are not allowed in statics\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:102:6\n   |\nLL |     &box MyOwned, //~ ERROR allocations are not allowed in statics\n   |      ^^^^^^^^^^^ allocation not allowed in statics\n\n"}
[01:31:44] {"message":"static contains unimplemented expression type","code":{"code":"E0019","explanation":"\nA function call isn't allowed in the const's initialization expression\nbecause the expression's value must be known at compile-time. Erroneous code\nexample:\n\n```compile_fail\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn test(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    const A: i32 = FOO.test(); // You can't call Test::func() here!\n}\n```\n\nRemember: you can't use a function call inside a const's initialization\nexpression! However, you can totally use it anywhere else:\n\n```\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn func(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    FOO.func(); // here is good\n    let x = FOO.func(); // or even here!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3146,"byte_end":3153,"line_start":102,"line_end":102,"column_start":10,"column_end":17,"is_primary":true,"text":[{"text":"    &box MyOwned, //~ ERROR allocations are not allowed in statics","highlight_start":10,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0019]: static contains unimplemented expression type\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:102:10\n   |\nLL |     &box MyOwned, //~ ERROR allocations are not allowed in statics\n   |          ^^^^^^^\n\n"}
[01:31:44] {"message":"allocations are not allowed in statics","code":{"code":"E0010","explanation":"\nThe value of statics and constants must be known at compile time, and they live\nfor the entire lifetime of a program. Creating a boxed value allocates memory on\nthe heap at runtime, and therefore cannot be done at compile time. Erroneous\ncode example:\n\n```compile_fail,E0010\n#![feature(box_syntax)]\n\nconst CON : Box<i32> = box 0;\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3258,"byte_end":3269,"line_start":104,"line_end":104,"column_start":6,"column_end":17,"is_primary":true,"text":[{"text":"    &box MyOwned, //~ ERROR allocations are not allowed in statics","highlight_start":6,"highlight_end":17}],"label":"allocation not allowed in statics","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0010]: allocations are not allowed in statics\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:104:6\n   |\nLL |     &box MyOwned, //~ ERROR allocations are not allowed in statics\n   |      ^^^^^^^^^^^ allocation not allowed in statics\n\n"}
[01:31:44] {"message":"static contains unimplemented expression type","code":{"code":"E0019","explanation":"\nA function call isn't allowed in the const's initialization expression\nbecause the expression's value must be known at compile-time. Erroneous code\nexample:\n\n```compile_fail\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn test(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    const A: i32 = FOO.test(); // You can't call Test::func() here!\n}\n```\n\nRemember: you can't use a function call inside a const's initialization\nexpression! However, you can totally use it anywhere else:\n\n```\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn func(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    FOO.func(); // here is good\n    let x = FOO.func(); // or even here!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3262,"byte_end":3269,"line_start":104,"line_end":104,"column_start":10,"column_end":17,"is_primary":true,"text":[{"text":"    &box MyOwned, //~ ERROR allocations are not allowed in statics","highlight_start":10,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0019]: static contains unimplemented expression type\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:104:10\n   |\nLL |     &box MyOwned, //~ ERROR allocations are not allowed in statics\n   |          ^^^^^^^\n\n"}
[01:31:44] {"message":"allocations are not allowed in statics","code":{"code":"E0010","explanation":"\nThe value of statics and constants must be known at compile time, and they live\nfor the entire lifetime of a program. Creating a boxed value allocates memory on\nthe heap at runtime, and therefore cannot be done at compile time. Erroneous\ncode example:\n\n```compile_fail,E0010\n#![feature(box_syntax)]\n\nconst CON : Box<i32> = box 0;\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3460,"byte_end":3465,"line_start":111,"line_end":111,"column_start":5,"column_end":10,"is_primary":true,"text":[{"text":"    box 3;","highlight_start":5,"highlight_end":10}],"label":"allocation not allowed in statics","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0010]: allocations are not allowed in statics\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:111:5\n   |\nLL |     box 3;\n   |     ^^^^^ allocation not allowed in statics\n\n"}
[01:31:44] {"message":"static contains unimplemented expression type","code":{"code":"E0019","explanation":"\nA function call isn't allowed in the const's initialization expression\nbecause the expression's value must be known at compile-time. Erroneous code\nexample:\n\n```compile_fail\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn test(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    const A: i32 = FOO.test(); // You can't call Test::func() here!\n}\n```\n\nRemember: you can't use a function call inside a const's initialization\nexpression! However, you can totally use it anywhere else:\n\n```\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn func(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    FOO.func(); // here is good\n    let x = FOO.func(); // or even here!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3464,"byte_end":3465,"line_start":111,"line_end":111,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"    box 3;","highlight_start":9,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0019]: static contains unimplemented expression type\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:111:9\n   |\nLL |     box 3;\n   |         ^\n\n"}
[01:31:44] {"message":"cannot move out of static item","code":{"code":"E0507","explanation":"\nYou tried to move out of a value which was borrowed. Erroneous code example:\n\n```compile_fail,E0507\nuse std::cell::RefCell;\n\nstruct TheDarkKnight;\n\nimpl TheDarkKnight {\n    fn nothing_is_true(self) {}\n}\n\nfn main() {\n    let x = RefCell::new(TheDarkKnight);\n\n    x.borrow().nothing_is_true(); // error: cannot move out of borrowed content\n}\n```\n\nHere, the `nothing_is_true` method takes the ownership of `self`. However,\n`self` cannot be moved because `.borrow()` only provides an `&TheDarkKnight`,\nwhich is a borrow of the content owned by the `RefCell`. To fix this error,\nyou have three choices:\n\n* Try to avoid moving the variable.\n* Somehow reclaim the ownership.\n* Implement the `Copy` trait on the type.\n\nExamples:\n\n```\nuse std::cell::RefCell;\n\nstruct TheDarkKnight;\n\nimpl TheDarkKnight {\n    fn nothing_is_true(&self) {} // First case, we don't take ownership\n}\n\nfn main() {\n    let x = RefCell::new(TheDarkKnight);\n\n    x.borrow().nothing_is_true(); // ok!\n}\n```\n\nOr:\n\n```\nuse std::cell::RefCell;\n\nstruct TheDarkKnight;\n\nimpl TheDarkKnight {\n    fn nothing_is_true(self) {}\n}\n\nfn main() {\n    let x = RefCell::new(TheDarkKnight);\n    let x = x.into_inner(); // we get back ownership\n\n    x.nothing_is_true(); // ok!\n}\n```\n\nOr:\n\n```\nuse std::cell::RefCell;\n\n#[derive(Clone, Copy)] // we implement the Copy trait\nstruct TheDarkKnight;\n\nimpl TheDarkKnight {\n    fn nothing_is_true(self) {}\n}\n\nfn main() {\n    let x = RefCell::new(TheDarkKnight);\n\n    x.borrow().nothing_is_true(); // ok!\n}\n```\n\nMoving a member out of a mutably borrowed struct will also cause E0507 error:\n\n```compile_fail,E0507\nstruct TheDarkKnight;\n\nimpl TheDarkKnight {\n    fn nothing_is_true(self) {}\n}\n\nstruct Batcave {\n    knight: TheDarkKnight\n}\n\nfn main() {\n    let mut cave = Batcave {\n        knight: TheDarkKnight\n    };\n    let borrowed = &mut cave;\n\n    borrowed.knight.nothing_is_true(); // E0507\n}\n```\n\nIt is fine only if you put something back. `mem::replace` can be used for that:\n\n```\n# struct TheDarkKnight;\n# impl TheDarkKnight { fn nothing_is_true(self) {} }\n# struct Batcave { knight: TheDarkKnight }\nuse std::mem;\n\nlet mut cave = Batcave {\n    knight: TheDarkKnight\n};\nlet borrowed = &mut cave;\n\nmem::replace(&mut borrowed.knight, TheDarkKnight).nothing_is_true(); // ok!\n```\n\nYou can find more information about borrowing in the rust-book:\nhttp://doc.rust-lang.org/book/first-edition/references-and-borrowing.html\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3627,"byte_end":3628,"line_start":116,"line_end":116,"column_start":45,"column_end":46,"is_primary":true,"text":[{"text":"    let y = { static x: Box<isize> = box 3; x };","highlight_start":45,"highlight_end":46}],"label":"cannot move out of static item","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider borrowing here","code":null,"level":"help","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3627,"byte_end":3628,"line_start":116,"line_end":116,"column_start":45,"column_end":46,"is_primary":true,"text":[{"text":"    let y = { static x: Box<isize> = box 3; x };","highlight_start":45,"highlight_end":46}],"label":null,"suggested_replacement":"&x","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0507]: cannot move out of static item\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:116:45\n   |\nLL |     let y = { static x: Box<isize> = box 3; x };\n   |                                             ^\n   |                                             |\n   |                                             cannot move out of static item\n   |                                             help: consider borrowing here: `&x`\n\n"}
[01:31:44] {"message":"allocations are not allowed in statics","code":{"code":"E0010","explanation":"\nThe value of statics and constants must be known at compile time, and they live\nfor the entire lifetime of a program. Creating a boxed value allocates memory on\nthe heap at runtime, and therefore cannot be done at compile time. Erroneous\ncode example:\n\n```compile_fail,E0010\n#![feature(box_syntax)]\n\nconst CON : Box<i32> = box 0;\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3620,"byte_end":3625,"line_start":116,"line_end":116,"column_start":38,"column_end":43,"is_primary":true,"text":[{"text":"    let y = { static x: Box<isize> = box 3; x };","highlight_start":38,"highlight_end":43}],"label":"allocation not allowed in statics","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0010]: allocations are not allowed in statics\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:116:38\n   |\nLL |     let y = { static x: Box<isize> = box 3; x };\n   |                                      ^^^^^ allocation not allowed in statics\n\n"}
[01:31:44] {"message":"static contains unimplemented expression type","code":{"code":"E0019","explanation":"\nA function call isn't allowed in the const's initialization expression\nbecause the expression's value must be known at compile-time. Erroneous code\nexample:\n\n```compile_fail\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn test(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    const A: i32 = FOO.test(); // You can't call Test::func() here!\n}\n```\n\nRemember: you can't use a function call inside a const's initialization\nexpression! However, you can totally use it anywhere else:\n\n```\nenum Test {\n    V1\n}\n\nimpl Test {\n    fn func(&self) -> i32 {\n        12\n    }\n}\n\nfn main() {\n    const FOO: Test = Test::V1;\n\n    FOO.func(); // here is good\n    let x = FOO.func(); // or even here!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/check-static-values-constraints.rs","byte_start":3624,"byte_end":3625,"line_start":116,"line_end":116,"column_start":42,"column_end":43,"is_primary":true,"text":[{"text":"    let y = { static x: Box<isize> = box 3; x };","highlight_start":42,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0019]: static contains unimplemented expression type\n  --> /checkout/src/test/ui/check-static-values-constraints.rs:116:42\n   |\nLL |     let y = { static x: Box<isize> = box 3; x };\n   |                                          ^\n\n"}
[01:31:44] {"message":"aborting due to 17 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 17 previous errors\n\n"}
[01:31:44] {"message":"Some errors occurred: E0010, E0015, E0019, E0493, E0507.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0010, E0015, E0019, E0493, E0507.\n"}
[01:31:44] 
[01:31:44] ------------------------------------------
[01:31:44] 
[01:31:44] thread '[ui (nll)] ui/check-static-values-constraints.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:31:44] thread '[ui (nll)] ui/check-static-values-constraints.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:31:44] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:31:44] 
[01:31:44] ---- [ui (nll)] ui/consts/min_const_fn/min_const_fn.rs stdout ----
[01:31:44] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:495:22
[01:31:44] diff of stderr:
[01:31:44] 
[01:31:44] 112 LL | const fn foo30_5(b: bool) { while b { } } //~ ERROR not stable in const fn
[01:31:44] 114 
[01:31:44] 114 
[01:31:44] - error: local variables in const fn are unstable
[01:31:44] -    |
[01:31:44] -    |
[01:31:44] - LL | const fn foo30_6() -> bool { let x = true; x } //~ ERROR local variables in const fn
[01:31:44] - 
[01:31:44] - 
[01:31:44] 121 error: `if`, `match`, `&&` and `||` are not stable in const fn
[01:31:44] 123    |
[01:31:44] 
[01:31:44] 
[01:31:44] 220 LL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }
[01:31:44] 222 
[01:31:44] - error: aborting due to 35 previous errors
[01:31:44] + error: aborting due to 34 previous errors
[01:31:44] 224 
[01:31:44] 224 
[01:31:44] 225 Some errors occurred: E0493, E0515.
[01:31:44] 226 For more information about an error, try `rustc --explain E0493`.
[01:31:44] 
[01:31:44] 
[01:31:44] The actual stderr differed from the expected stderr.
[01:31:44] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/min_const_fn/min_const_fn.nll/min_const_fn.nll.stderr
[01:31:44] To update references, rerun the tests and pass the `--bless` flag
[01:31:44] To only update this specific test, also pass `--test-args consts/min_const_fn/min_const_fn.rs`
[01:31:44] error: 1 errors occurred comparing output.
[01:31:44] status: exit code: 1
[01:31:44] status: exit code: 1
[01:31:44] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/min_const_fn/min_const_fn.nll/a" "-Zborrowck=migrate" "-Ztwo-phase-borrows" "-Crpath" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/min_const_fn/min_const_fn.nll/auxiliary" "-A" "unused"
[01:31:44] ------------------------------------------
[01:31:44] 
[01:31:44] ------------------------------------------
[01:31:44] stderr:
[01:31:44] stderr:
[01:31:44] ------------------------------------------
[01:31:44] {"message":"destructors cannot be evaluated at compile-time","code":{"code":"E0493","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":1264,"byte_end":1268,"line_start":37,"line_end":37,"column_start":25,"column_end":29,"is_primary":true,"text":[{"text":"    const fn into_inner(self) -> T { self.0 } //~ destructors cannot be evaluated","highlight_start":25,"highlight_end":29}],"label":"constant functions cannot evaluate destructors","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0493]: destructors cannot be evaluated at compile-time\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:37:25\n   |\nLL |     const fn into_inner(self) -> T { self.0 } //~ destructors cannot be evaluated\n   |                         ^^^^ constant functions cannot evaluate destructors\n\n"}
[01:31:44] {"message":"mutable references in const fn are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":1399,"byte_end":1405,"line_start":39,"line_end":39,"column_start":36,"column_end":42,"is_primary":true,"text":[{"text":"    const fn get_mut(&mut self) -> &mut T { &mut self.0 }","highlight_start":36,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: mutable references in const fn are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:39:36\n   |\nLL |     const fn get_mut(&mut self) -> &mut T { &mut self.0 }\n   |                                    ^^^^^^\n\n"}
[01:31:44] {"message":"destructors cannot be evaluated at compile-time","code":{"code":"E0493","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":1570,"byte_end":1574,"line_start":44,"line_end":44,"column_start":28,"column_end":32,"is_primary":true,"text":[{"text":"    const fn into_inner_lt(self) -> T { self.0 } //~ destructors cannot be evaluated","highlight_start":28,"highlight_end":32}],"label":"constant functions cannot evaluate destructors","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0493]: destructors cannot be evaluated at compile-time\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:44:28\n   |\nLL |     const fn into_inner_lt(self) -> T { self.0 } //~ destructors cannot be evaluated\n   |                            ^^^^ constant functions cannot evaluate destructors\n\n"}
[01:31:44] {"message":"mutable references in const fn are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":1717,"byte_end":1723,"line_start":46,"line_end":46,"column_start":42,"column_end":48,"is_primary":true,"text":[{"text":"    const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }","highlight_start":42,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: mutable references in const fn are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:46:42\n   |\nLL |     const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 }\n   |                                          ^^^^^^\n\n"}
[01:31:44] {"message":"destructors cannot be evaluated at compile-time","code":{"code":"E0493","explanation":null},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":1889,"byte_end":1893,"line_start":51,"line_end":51,"column_start":27,"column_end":31,"is_primary":true,"text":[{"text":"    const fn into_inner_s(self) -> T { self.0 } //~ ERROR destructors","highlight_start":27,"highlight_end":31}],"label":"constant functions cannot evaluate destructors","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0493]: destructors cannot be evaluated at compile-time\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:51:27\n   |\nLL |     const fn into_inner_s(self) -> T { self.0 } //~ ERROR destructors\n   |                           ^^^^ constant functions cannot evaluate destructors\n\n"}
[01:31:44] {"message":"mutable references in const fn are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":2014,"byte_end":2020,"line_start":53,"line_end":53,"column_start":38,"column_end":44,"is_primary":true,"text":[{"text":"    const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }","highlight_start":38,"highlight_end":44}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: mutable references in const fn are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:53:38\n   |\nLL |     const fn get_mut_s(&mut self) -> &mut T { &mut self.0 }\n   |                                      ^^^^^^\n\n"}
[01:31:44] {"message":"mutable references in const fn are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":2200,"byte_end":2206,"line_start":58,"line_end":58,"column_start":39,"column_end":45,"is_primary":true,"text":[{"text":"    const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }","highlight_start":39,"highlight_end":45}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: mutable references in const fn are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:58:39\n   |\nLL |     const fn get_mut_sq(&mut self) -> &mut T { &mut self.0 }\n   |                                       ^^^^^^\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":2926,"byte_end":2927,"line_start":76,"line_end":76,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"const fn foo11<T: std::fmt::Display>(t: T) -> T { t }","highlight_start":16,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:76:16\n   |\nLL | const fn foo11<T: std::fmt::Display>(t: T) -> T { t }\n   |                ^\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3061,"byte_end":3062,"line_start":78,"line_end":78,"column_start":18,"column_end":19,"is_primary":true,"text":[{"text":"const fn foo11_2<T: Send>(t: T) -> T { t }","highlight_start":18,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:78:18\n   |\nLL | const fn foo11_2<T: Send>(t: T) -> T { t }\n   |                  ^\n\n"}
[01:31:44] {"message":"only int, `bool` and `char` operations are stable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3198,"byte_end":3205,"line_start":80,"line_end":80,"column_start":33,"column_end":40,"is_primary":true,"text":[{"text":"const fn foo19(f: f32) -> f32 { f * 2.0 }","highlight_start":33,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: only int, `bool` and `char` operations are stable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:80:33\n   |\nLL | const fn foo19(f: f32) -> f32 { f * 2.0 }\n   |                                 ^^^^^^^\n\n"}
[01:31:44] {"message":"only int, `bool` and `char` operations are stable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3315,"byte_end":3322,"line_start":82,"line_end":82,"column_start":35,"column_end":42,"is_primary":true,"text":[{"text":"const fn foo19_2(f: f32) -> f32 { 2.0 - f }","highlight_start":35,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: only int, `bool` and `char` operations are stable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:82:35\n   |\nLL | const fn foo19_2(f: f32) -> f32 { 2.0 - f }\n   |                                   ^^^^^^^\n\n"}
[01:31:44] {"message":"only int and `bool` operations are stable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3432,"byte_end":3434,"line_start":84,"line_end":84,"column_start":35,"column_end":37,"is_primary":true,"text":[{"text":"const fn foo19_3(f: f32) -> f32 { -f }","highlight_start":35,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: only int and `bool` operations are stable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:84:35\n   |\nLL | const fn foo19_3(f: f32) -> f32 { -f }\n   |                                   ^^\n\n"}
[01:31:44] {"message":"only int, `bool` and `char` operations are stable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3544,"byte_end":3549,"line_start":86,"line_end":86,"column_start":43,"column_end":48,"is_primary":true,"text":[{"text":"const fn foo19_4(f: f32, g: f32) -> f32 { f / g }","highlight_start":43,"highlight_end":48}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: only int, `bool` and `char` operations are stable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:86:43\n   |\nLL | const fn foo19_4(f: f32, g: f32) -> f32 { f / g }\n   |                                           ^^^^^\n\n"}
[01:31:44] {"message":"cannot access `static` items in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3674,"byte_end":3677,"line_start":90,"line_end":90,"column_start":27,"column_end":30,"is_primary":true,"text":[{"text":"const fn foo25() -> u32 { BAR } //~ ERROR cannot access `static` items in const fn","highlight_start":27,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: cannot access `static` items in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:90:27\n   |\nLL | const fn foo25() -> u32 { BAR } //~ ERROR cannot access `static` items in const fn\n   |                           ^^^\n\n"}
[01:31:44] {"message":"cannot access `static` items in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3766,"byte_end":3770,"line_start":91,"line_end":91,"column_start":36,"column_end":40,"is_primary":true,"text":[{"text":"const fn foo26() -> &'static u32 { &BAR } //~ ERROR cannot access `static` items","highlight_start":36,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: cannot access `static` items in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:91:36\n   |\nLL | const fn foo26() -> &'static u32 { &BAR } //~ ERROR cannot access `static` items\n   |                                    ^^^^\n\n"}
[01:31:44] {"message":"casting pointers to ints is unstable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3853,"byte_end":3863,"line_start":92,"line_end":92,"column_start":42,"column_end":52,"is_primary":true,"text":[{"text":"const fn foo30(x: *const u32) -> usize { x as usize }","highlight_start":42,"highlight_end":52}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: casting pointers to ints is unstable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:92:42\n   |\nLL | const fn foo30(x: *const u32) -> usize { x as usize }\n   |                                          ^^^^^^^^^^\n\n"}
[01:31:44] {"message":"casting pointers to ints is unstable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":3942,"byte_end":3952,"line_start":94,"line_end":94,"column_start":42,"column_end":52,"is_primary":true,"text":[{"text":"const fn foo30_2(x: *mut u32) -> usize { x as usize }","highlight_start":42,"highlight_end":52}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: casting pointers to ints is unstable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:94:42\n   |\nLL | const fn foo30_2(x: *mut u32) -> usize { x as usize }\n   |                                          ^^^^^^^^^^\n\n"}
[01:31:44] {"message":"`if`, `match`, `&&` and `||` are not stable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":4027,"byte_end":4049,"line_start":96,"line_end":96,"column_start":38,"column_end":60,"is_primary":true,"text":[{"text":"const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } }","highlight_start":38,"highlight_end":60}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `if`, `match`, `&&` and `||` are not stable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:96:38\n   |\nLL | const fn foo30_4(b: bool) -> usize { if b { 1 } else { 42 } }\n   |                                      ^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"`if`, `match`, `&&` and `||` are not stable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":4147,"byte_end":4158,"line_start":98,"line_end":98,"column_start":29,"column_end":40,"is_primary":true,"text":[{"text":"const fn foo30_5(b: bool) { while b { } } //~ ERROR not stable in const fn","highlight_start":29,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `if`, `match`, `&&` and `||` are not stable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:98:29\n   |\nLL | const fn foo30_5(b: bool) { while b { } } //~ ERROR not stable in const fn\n   |                             ^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"`if`, `match`, `&&` and `||` are not stable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":4284,"byte_end":4290,"line_start":100,"line_end":100,"column_start":44,"column_end":50,"is_primary":true,"text":[{"text":"const fn foo36(a: bool, b: bool) -> bool { a && b }","highlight_start":44,"highlight_end":50}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `if`, `match`, `&&` and `||` are not stable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:100:44\n   |\nLL | const fn foo36(a: bool, b: bool) -> bool { a && b }\n   |                                            ^^^^^^\n\n"}
[01:31:44] {"message":"`if`, `match`, `&&` and `||` are not stable in const fn","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":4403,"byte_end":4409,"line_start":102,"line_end":102,"column_start":44,"column_end":50,"is_primary":true,"text":[{"text":"const fn foo37(a: bool, b: bool) -> bool { a || b }","highlight_start":44,"highlight_end":50}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `if`, `match`, `&&` and `||` are not stable in const fn\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:102:44\n   |\nLL | const fn foo37(a: bool, b: bool) -> bool { a || b }\n   |                                            ^^^^^^\n\n"}
[01:31:44] {"message":"mutable references in const fn are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":4492,"byte_end":4493,"line_start":104,"line_end":104,"column_start":14,"column_end":15,"is_primary":true,"text":[{"text":"const fn inc(x: &mut i32) { *x += 1 }","highlight_start":14,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: mutable references in const fn are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:104:14\n   |\nLL | const fn inc(x: &mut i32) { *x += 1 }\n   |              ^\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":4592,"byte_end":4593,"line_start":109,"line_end":109,"column_start":6,"column_end":7,"is_primary":true,"text":[{"text":"impl<T: std::fmt::Debug> Foo<T> {","highlight_start":6,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:109:6\n   |\nLL | impl<T: std::fmt::Debug> Foo<T> {\n   |      ^\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":4735,"byte_end":4736,"line_start":114,"line_end":114,"column_start":6,"column_end":7,"is_primary":true,"text":[{"text":"impl<T: std::fmt::Debug + Sized> Foo<T> {","highlight_start":6,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:114:6\n   |\nLL | impl<T: std::fmt::Debug + Sized> Foo<T> {\n   |      ^\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":4887,"byte_end":4888,"line_start":119,"line_end":119,"column_start":6,"column_end":7,"is_primary":true,"text":[{"text":"impl<T: Sync + Sized> Foo<T> {","highlight_start":6,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:119:6\n   |\nLL | impl<T: Sync + Sized> Foo<T> {\n   |      ^\n\n"}
[01:31:44] {"message":"`impl Trait` in const fn is unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5071,"byte_end":5103,"line_start":125,"line_end":125,"column_start":24,"column_end":56,"is_primary":true,"text":[{"text":"const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) }","highlight_start":24,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `impl Trait` in const fn is unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:125:24\n   |\nLL | const fn no_rpit2() -> AlanTuring<impl std::fmt::Debug> { AlanTuring(0) }\n   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5203,"byte_end":5223,"line_start":127,"line_end":127,"column_start":34,"column_end":54,"is_primary":true,"text":[{"text":"const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}","highlight_start":34,"highlight_end":54}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:127:34\n   |\nLL | const fn no_apit2(_x: AlanTuring<impl std::fmt::Debug>) {}\n   |                                  ^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5293,"byte_end":5313,"line_start":129,"line_end":129,"column_start":22,"column_end":42,"is_primary":true,"text":[{"text":"const fn no_apit(_x: impl std::fmt::Debug) {} //~ ERROR trait bounds other than `Sized`","highlight_start":22,"highlight_end":42}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:129:22\n   |\nLL | const fn no_apit(_x: impl std::fmt::Debug) {} //~ ERROR trait bounds other than `Sized`\n   |                      ^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"`impl Trait` in const fn is unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5382,"byte_end":5402,"line_start":130,"line_end":130,"column_start":23,"column_end":43,"is_primary":true,"text":[{"text":"const fn no_rpit() -> impl std::fmt::Debug {} //~ ERROR `impl Trait` in const fn is unstable","highlight_start":23,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: `impl Trait` in const fn is unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:130:23\n   |\nLL | const fn no_rpit() -> impl std::fmt::Debug {} //~ ERROR `impl Trait` in const fn is unstable\n   |                       ^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5475,"byte_end":5477,"line_start":131,"line_end":131,"column_start":23,"column_end":25,"is_primary":true,"text":[{"text":"const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {} //~ ERROR trait bounds other than `Sized`","highlight_start":23,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:131:23\n   |\nLL | const fn no_dyn_trait(_x: &dyn std::fmt::Debug) {} //~ ERROR trait bounds other than `Sized`\n   |                       ^^\n\n"}
[01:31:44] make: *** [check] Error 1
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5577,"byte_end":5605,"line_start":132,"line_end":132,"column_start":32,"column_end":60,"is_primary":true,"text":[{"text":"const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }","highlight_start":32,"highlight_end":60}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:132:32\n   |\nLL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }\n   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"cannot return reference to temporary value","code":{"code":"E0515","explanation":"\nCannot return value that references local variable\n\nLocal variables, function parameters and temporaries are all dropped before the\nend of the function body. So a reference to them cannot be returned.\n\n```compile_fail,E0515\n#![feature(nll)]\nfn get_dangling_reference() -> &'static i32 {\n    let x = 0;\n    &x\n}\n```\n\n```compile_fail,E0515\n#![feature(nll)]\nuse std::slice::Iter;\nfn get_dangling_iterator<'a>() -> Iter<'a, i32> {\n    let v = vec![1, 2, 3];\n    v.iter()\n}\n```\n\nConsider returning an owned value instead:\n\n```\nuse std::vec::IntoIter;\n\nfn get_integer() -> i32 {\n    let x = 0;\n    x\n}\n\nfn get_owned_iterator() -> IntoIter<i32> {\n    let v = vec![1, 2, 3];\n    v.into_iter()\n}\n```\n"},"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5608,"byte_end":5611,"line_start":132,"line_end":132,"column_start":63,"column_end":66,"is_primary":true,"text":[{"text":"const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }","highlight_start":63,"highlight_end":66}],"label":"returns a reference to data owned by the current function","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5609,"byte_end":5611,"line_start":132,"line_end":132,"column_start":64,"column_end":66,"is_primary":false,"text":[{"text":"const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }","highlight_start":64,"highlight_end":66}],"label":"temporary value created here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"this error has been downgraded to a warning for backwards compatibility with previous releases","code":null,"level":"warning","spans":[],"children":[],"rendered":null},{"message":"this represents potential undefined behavior in your code and this warning will become a hard error in the future","code":null,"level":"warning","spans":[],"children":[],"rendered":null}],"rendered":"warning[E0515]: cannot return reference to temporary value\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:132:63\n   |\nLL | const fn no_dyn_trait_ret() -> &'static dyn std::fmt::Debug { &() }\n   |                                                               ^--\n   |                                                               ||\n   |                                                               |temporary value created here\n   |                                                               returns a reference to data owned by the current function\n   |\n   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases\n   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future\n\n"}
[01:31:44] {"message":"trait bounds other than `Sized` on const fn parameters are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5734,"byte_end":5763,"line_start":137,"line_end":137,"column_start":41,"column_end":70,"is_primary":true,"text":[{"text":"const fn really_no_traits_i_mean_it() { (&() as &std::fmt::Debug, ()).1 }","highlight_start":41,"highlight_end":70}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: trait bounds other than `Sized` on const fn parameters are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:137:41\n   |\nLL | const fn really_no_traits_i_mean_it() { (&() as &std::fmt::Debug, ()).1 }\n   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[01:31:44] {"message":"function pointers in const fn are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5832,"byte_end":5834,"line_start":140,"line_end":140,"column_start":21,"column_end":23,"is_primary":true,"text":[{"text":"const fn no_fn_ptrs(_x: fn()) {}","highlight_start":21,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: function pointers in const fn are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:140:21\n   |\nLL | const fn no_fn_ptrs(_x: fn()) {}\n   |                     ^^\n\n"}
[01:31:44] {"message":"function pointers in const fn are unstable","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs","byte_start":5925,"byte_end":5929,"line_start":142,"line_end":142,"column_start":27,"column_end":31,"is_primary":true,"text":[{"text":"const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }","highlight_start":27,"highlight_end":31}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: function pointers in const fn are unstable\n  --> /checkout/src/test/ui/consts/min_const_fn/min_const_fn.rs:142:27\n   |\nLL | const fn no_fn_ptrs2() -> fn() { fn foo() {} foo }\n   |                           ^^^^\n\n"}
[01:31:44] {"message":"aborting due to 34 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 34 previous errors\n\n"}
[01:31:44] {"message":"Some errors occurred: E0493, E0515.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0493, E0515.\n"}
[01:31:44] 
[01:31:44] ------------------------------------------
[01:31:44] 
[01:31:44] thread '[ui (nll)] ui/consts/min_const_fn/min_const_fn.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:31:44] thread '[ui (nll)] ui/consts/min_const_fn/min_const_fn.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:31:44] 
[01:31:44] ---- [ui (nll)] ui/consts/promote_const_let.rs stdout ----
[01:31:44] diff of stderr:
[01:31:44] 
[01:31:44] 1 error[E0597]: `y` does not live long enough
[01:31:44] +   --> $DIR/promote_const_let.rs:4:9
[01:31:44] 3    |
[01:31:44] 3    |
[01:31:44] 4 LL |     let x: &'static u32 = {
[01:31:44] 5    |            ------------ type annotation requires that `y` is borrowed for `'static`
[01:31:44] 9 LL |     };
[01:31:44] 9 LL |     };
[01:31:44] 10    |     - `y` dropped here while still borrowed
[01:31:44] - error: aborting due to previous error
[01:31:44] - error: aborting due to previous error
[01:31:44] + error[E0716]: temporary value dropped while borrowed
[01:31:44] +    |
[01:31:44] +    |
[01:31:44] + LL |       let x: &'static u32 = &{ //~ ERROR does not live long enough
[01:31:44] +    |  ____________------------____^
[01:31:44] +    | |            type annotation requires that borrow lasts for `'static`
[01:31:44] +    | |            type annotation requires that borrow lasts for `'static`
[01:31:44] + LL | |         let y = 42;
[01:31:44] + LL | |         y
[01:31:44] + LL | |     };
[01:31:44] +    | |_____^ creates a temporary which is freed while still in use
[01:31:44] + LL |   }
[01:31:44] +    |   - temporary value is freed at the end of this statement
[01:31:44] - For more information about this error, try `rustc --explain E0597`.
[01:31:44] + error: aborting due to 2 previous errors
[01:31:44] + 
[01:31:44] + Some errors occurred: E0597, E0716.
[01:31:44] + Some errors occurred: E0597, E0716.
[01:31:44] + For more information about an error, try `rustc --explain E0597`.
[01:31:44] 15 
[01:31:44] 
[01:31:44] 
[01:31:44] The actual stderr differed from the expected stderr.
[01:31:44] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/promote_const_let.nll/promote_const_let.nll.stderr
[01:31:44] To update references, rerun the tests and pass the `--bless` flag
[01:31:44] To only update this specific test, also pass `--test-args consts/promote_const_let.rs`
[01:31:44] error: 1 errors occurred comparing output.
[01:31:44] status: exit code: 1
[01:31:44] status: exit code: 1
[01:31:44] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/promote_const_let.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/promote_const_let.nll/a" "-Zborrowck=migrate" "-Ztwo-phase-borrows" "-Crpath" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/promote_const_let.nll/auxiliary" "-A" "unused"
[01:31:44] ------------------------------------------
[01:31:44] 
[01:31:44] ------------------------------------------
[01:31:44] stderr:
[01:31:44] stderr:
[01:31:44] ------------------------------------------
[01:31:44] {"message":"`y` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/promote_const_let.rs","byte_start":68,"byte_end":70,"line_start":4,"line_end":4,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":"        &y //~ ERROR does not live long enough","highlight_start":9,"highlight_end":11}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/consts/promote_const_let.rs","byte_start":111,"byte_end":112,"line_start":5,"line_end":5,"column_start":5,"column_end":6,"is_primary":false,"text":[{"text":"    };","highlight_start":5,"highlight_end":6}],"label":"`y` dropped here while still borrowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/consts/promote_const_let.rs","byte_start":23,"byte_end":35,"line_start":2,"line_end":2,"column_start":12,"column_end":24,"is_primary":false,"text":[{"text":"    let x: &'static u32 = {","highlight_start":12,"highlight_end":24}],"label":"type annotation requires that `y` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `y` does not live long enough\n  --> /checkout/src/test/ui/consts/promote_const_let.rs:4:9\n   |\nLL |     let x: &'static u32 = {\n   |            ------------ type annotation requires that `y` is borrowed for `'static`\nLL |         let y = 42;\nLL |         &y //~ ERROR does not live long enough\n   |         ^^ borrowed value does not live long enough\nLL |     };\n   |     - `y` dropped here while still borrowed\n\n"}
[01:31:44] {"message":"temporary value dropped while borrowed","code":{"code":"E0716","explanation":"\nThis error indicates that a temporary value is being dropped\nwhile a borrow is still in active use.\n\nErroneous code example:\n\n```compile_fail,E0716\n# #![feature(nll)]\nfn foo() -> i32 { 22 }\nfn bar(x: &i32) -> &i32 { x }\nlet p = bar(&foo());\n         // ------ creates a temporary\nlet q = *p;\n```\n\nHere, the expression `&foo()` is borrowing the expression\n`foo()`. As `foo()` is call to a function, and not the name of\na variable, this creates a **temporary** -- that temporary stores\nthe return value from `foo()` so that it can be borrowed.\nSo you might imagine that `let p = bar(&foo())` is equivalent\nto this:\n\n```compile_fail,E0597\n# fn foo() -> i32 { 22 }\n# fn bar(x: &i32) -> &i32 { x }\nlet p = {\n  let tmp = foo(); // the temporary\n  bar(&tmp)\n}; // <-- tmp is freed as we exit this block\nlet q = p;\n```\n\nWhenever a temporary is created, it is automatically dropped (freed)\naccording to fixed rules. Ordinarily, the temporary is dropped\nat the end of the enclosing statement -- in this case, after the `let`.\nThis is illustrated in the example above by showing that `tmp` would\nbe freed as we exit the block.\n\nTo fix this problem, you need to create a local variable\nto store the value in rather than relying on a temporary.\nFor example, you might change the original program to\nthe following:\n\n```\nfn foo() -> i32 { 22 }\nfn bar(x: &i32) -> &i32 { x }\nlet value = foo(); // dropped at the end of the enclosing block\nlet p = bar(&value);\nlet q = *p;\n```\n\nBy introducing the explicit `let value`, we allocate storage\nthat will last until the end of the enclosing block (when `value`\ngoes out of scope). When we borrow `&value`, we are borrowing a\nlocal variable that already exists, and hence no temporary is created.\n\nTemporaries are not always dropped at the end of the enclosing\nstatement. In simple cases where the `&` expression is immediately\nstored into a variable, the compiler will automatically extend\nthe lifetime of the temporary until the end of the enclosinb\nblock. Therefore, an alternative way to fix the original\nprogram is to write `let tmp = &foo()` and not `let tmp = foo()`:\n\n```\nfn foo() -> i32 { 22 }\nfn bar(x: &i32) -> &i32 { x }\nlet value = &foo();\nlet p = bar(value);\nlet q = *p;\n```\n\nHere, we are still borrowing `foo()`, but as the borrow is assigned\ndirectly into a variable, the temporary will not be dropped until\nthe end of the enclosing block. Similar rules apply when temporaries\nare stored into aggregate structures like a tuple or struct:\n\n```\n// Here, two temporaries are created, but\n// as they are stored directly into `value`,\n// they are not dropped until the end of the\n// enclosing block.\nfn foo() -> i32 { 22 }\nlet value = (&foo(), &foo());\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/consts/promote_const_let.rs","byte_start":141,"byte_end":214,"line_start":6,"line_end":9,"column_start":28,"column_end":6,"is_primary":true,"text":[{"text":"    let x: &'static u32 = &{ //~ ERROR does not live long enough","highlight_start":28,"highlight_end":65},{"text":"        let y = 42;","highlight_start":1,"highlight_end":20},{"text":"        y","highlight_start":1,"highlight_end":10},{"text":"    };","highlight_start":1,"highlight_end":6}],"label":"creates a temporary which is freed while still in use","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/consts/promote_const_let.rs","byte_start":216,"byte_end":217,"line_start":10,"line_end":10,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"temporary value is freed at the end of this statement","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/consts/promote_const_let.rs","byte_start":125,"byte_end":137,"line_start":6,"line_end":6,"column_start":12,"column_end":24,"is_primary":false,"text":[{"text":"    let x: &'static u32 = &{ //~ ERROR does not live long enough","highlight_start":12,"highlight_end":24}],"label":"type annotation requires that borrow lasts for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0716]: temporary value dropped while borrowed\n  --> /checkout/src/test/ui/consts/promote_const_let.rs:6:28\n   |\nLL |       let x: &'static u32 = &{ //~ ERROR does not live long enough\n   |  ____________------------____^\n   | |            |\n   | |            type annotation requires that borrow lasts for `'static`\nLL | |         let y = 42;\nLL | |         y\nLL | |     };\n   | |_____^ creates a temporary which is freed while still in use\nLL |   }\n   |   - temporary value is freed at the end of this statement\n\n"}
[01:31:44] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[01:31:45] {"message":"Some errors occurred: E0597, E0716.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0597, E0716.\n"}
[01:31:45] 
[01:31:45] ------------------------------------------
[01:31:45] 
[01:31:45] thread '[ui (nll)] ui/consts/promote_const_let.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:31:45] thread '[ui (nll)] ui/consts/promote_const_let.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3245:9
[01:31:45] 
[01:31:45] ---- [ui (nll)] ui/issues/issue-18118.rs stdout ----
[01:31:45] diff of stderr:
[01:31:45] 
[01:31:45] - error[E0658]: let bindings in constants are unstable (see issue #48821)
[01:31:45] -   --> $DIR/issue-18118.rs:5:17
[01:31:45] -    |
[01:31:45] - LL |         let p = 3;
[01:31:45] -    |
[01:31:45] -    = help: add #![feature(const_let)] to the crate attributes to enable
[01:31:45] - 
[01:31:45] - error[E0658]: statements in constants are unstable (see issue #48821)
[01:31:45] - error[E0658]: statements in constants are unstable (see issue #48821)
[01:31:45] -   --> $DIR/issue-18118.rs:5:17
[01:31:45] -    |
[01:31:45] - LL |         let p = 3;
[01:31:45] -    |
[01:31:45] -    = help: add #![feature(const_let)] to the crate attributes to enable
[01:31:45] - 
[01:31:45] - error[E0658]: let bindings in constants are unstable (see issue #48821)
[01:31:45] - error[E0658]: let bindings in constants are unstable (see issue #48821)
[01:31:45] -   --> $DIR/issue-18118.rs:8:9
[01:31:45] -    |
[01:31:45] - LL |         &p //~ ERROR `p` does not live long enough
[01:31:45] -    |
[01:31:45] -    = help: add #![feature(const_let)] to the crate attributes to enable
[01:31:45] - 
[01:31:45] - error[E0658]: let bindings in constants are unstable (see issue #48821)
[01:31:45] - error[E0658]: let bindings in constants are unstable (see issue #48821)
[01:31:45] -   --> $DIR/issue-18118.rs:2:5
[01:31:45] -    |
[01:31:45] - LL | /     const z: &'static isize = {
[01:31:45] - LL | |         //~^ ERROR let bindings in constants are unstable
[01:31:45] - LL | |         //~| ERROR statements in constants are unstable
[01:31:45] - LL | |         let p = 3;
[01:31:45] - ...  |
[01:31:45] - LL | |         //~^ ERROR let bindings in constants are unstable
[01:31:45] - LL | |     };
[01:31:45] -    |
[01:31:45] -    = help: add #![feature(const_let)] to the crate attributes to enable
[01:31:45] - 
[01:31:45] - error[E0658]: statements in constants are unstable (see issue #48821)
[01:31:45] - error[E0658]: statements in constants are unstable (see issue #48821)
[01:31:45] -   --> $DIR/issue-18118.rs:2:5
[01:31:45] -    |
[01:31:45] - LL | /     const z: &'static isize = {
[01:31:45] - LL | |         //~^ ERROR let bindings in constants are unstable
[01:31:45] - LL | |         //~| ERROR statements in constants are unstable
[01:31:45] - LL | |         let p = 3;
[01:31:45] - ...  |
[01:31:45] - LL | |         //~^ ERROR let bindings in constants are unstable
[01:31:45] - LL | |     };
[01:31:45] -    |
[01:31:45] -    = help: add #![feature(const_let)] to the crate attributes to enable
[01:31:45] - 
[01:31:45] - 
[01:31:45] 53 error[E0597]: `p` does not live long enough
[01:31:45] +   --> $DIR/issue-18118.rs:4:9
[01:31:45] 55    |
[01:31:45] 55    |
[01:31:45] 56 LL |         &p //~ ERROR `p` does not live long enough
[01:31:45] 
[01:31:45] 58    |         |
[01:31:45] 58    |         |
[01:31:45] 59    |         borrowed value does not live long enough
[01:31:45] 60    |         using this value as a constant requires that `p` is borrowed for `'static`
[01:31:45] - LL |         //~^ ERROR let bindings in constants are unstable
[01:31:45] 62 LL |     };
[01:31:45] 63    |     - `p` dropped here while still borrowed
[01:31:45] 
[01:31:45] - error: aborting due to 6 previous errors
[01:31:45] + error: aborting due to previous error
[01:31:45] 66 
[01:31:45] 66 
[01:31:45] - Some errors occurred: E0597, E0658.
[01:31:45] - For more information about an error, try `rustc --explain E0597`.
[01:31:45] + For more information about this error, try `rustc --explain E0597`.
[01:31:45] 69 
[01:31:45] 
[01:31:45] 
[01:31:45] The actual stderr differed from the expected stderr.
[01:31:45] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-18118.nll/issue-18118.nll.stderr
[01:31:45] To update references, rerun the tests and pass the `--bless` flag
[01:31:45] To only update this specific test, also pass `--test-args issues/issue-18118.rs`
[01:31:45] error: 1 errors occurred comparing output.
[01:31:45] status: exit code: 1
[01:31:45] status: exit code: 1
[01:31:45] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/issues/issue-18118.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-18118.nll/a" "-Zborrowck=migrate" "-Ztwo-phase-borrows" "-Crpath" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-18118.nll/auxiliary" "-A" "unused"
[01:31:45] ------------------------------------------
[01:31:45] 
[01:31:45] ------------------------------------------
[01:31:45] stderr:
[01:31:45] stderr:
[01:31:45] ------------------------------------------
[01:31:45] {"message":"`p` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/issues/issue-18118.rs","byte_start":75,"byte_end":77,"line_start":4,"line_end":4,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":"        &p //~ ERROR `p` does not live long enough","highlight_start":9,"highlight_end":11}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-18118.rs","byte_start":122,"byte_end":123,"line_start":5,"line_end":5,"column_start":5,"column_end":6,"is_primary":false,"text":[{"text":"    };","highlight_start":5,"highlight_end":6}],"label":"`p` dropped here while still borrowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/issues/issue-18118.rs","byte_start":75,"byte_end":77,"line_start":4,"line_end":4,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":"        &p //~ ERROR `p` does not live long enough","highlight_start":9,"highlight_end":11}],"label":"using this value as a constant requires that `p` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `p` does not live long enough\n  --> /checkout/src/test/ui/issues/issue-18118.rs:4:9\n   |\nLL |         &p //~ ERROR `p` does not live long enough\n   |         ^^\n   |         |\n   |         borrowed value does not live long enough\n   |         using this value as a constant requires that `p` is borrowed for `'static`\nLL |     };\n   |     - `p` dropped here while still borrowed\n\n"}
[01:31:45] {"message":"For more information about this error, try `rustc --explain E0597`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0597`.\n"}
[01:31:45] 
[01:31:45] ------------------------------------------
[01:31:45] 
---
[01:31:45] test result: FAILED. 5206 passed; 4 failed; 88 ignored; 0 measured; 0 filtered out
[01:31:45] 
[01:31:45] 
[01:31:45] 
[01:31:45] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "8.0.0svn\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always" "--compare-mode" "nll"
[01:31:45] 
[01:31:45] 
[01:31:45] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:31:45] Build completed unsuccessfully in 0:08:13
[01:31:45] Build completed unsuccessfully in 0:08:13
[01:31:45] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0cd3f1ee
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri Jan 11 16:26:26 UTC 2019
---
travis_time:end:1568155e:start=1547223988757316470,finish=1547223988774942874,duration=17626404
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0288027c
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0c639693
travis_time:start:0c639693
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:06bf00ee
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 11, 2019
@Centril Centril closed this Jan 11, 2019
@Centril Centril deleted the rollup branch January 12, 2019 08:51
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants