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

Filter global bounds from ParamEnv again. #50876

Merged
merged 1 commit into from
May 22, 2018

Conversation

matthewjasper
Copy link
Contributor

This PR adds back the filtering of global bounds from ParamEnv as a temporary solution for #50825.

Long term, the fix seems like it should be changing the priority in candidate_should_be_dropped_in_favor_of so that (global) where clauses aren't considered as highly.

/// Returns true if `victim` should be dropped in favor of
/// `other`. Generally speaking we will drop duplicate
/// candidates and prefer where-clause candidates.
///
/// See the comment for "SelectionCandidate" for more details.
fn candidate_should_be_dropped_in_favor_of<'o>(

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 18, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 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.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/c2/1e/f70d1125f5bf6383d2ee7a76aea72bed6ba103c1bb9dd4ca051787552d2b/awscli-1.15.24-py2.py3-none-any.whl (1.3MB)
    0% |▎                               | 10kB 16.2MB/s eta 0:00:01
    1% |▌                               | 20kB 1.9MB/s eta 0:00:01
    2% |▉                               | 30kB 2.2MB/s eta 0:00:01
    3% |█                               | 40kB 2.0MB/s eta 0:00:01
---
[00:49:09] ......................................i.............................................................
[00:49:13] ....................................................................................................
[00:49:17] ....................................................................................................
[00:49:20] ....................................................................................................
[00:49:23] ........................................................................F...........................
[00:49:33] ....................................................................................................
[00:49:38] ....................................................................................................
[00:49:43] ..............................................................i.....................................
[00:49:48] .......................................i............................................................
[00:49:48] .......................................i............................................................
[00:49:53] ...........................................................ii.......................................
[00:49:58] ....................................................................................................
[00:50:04] ............................................................i.................iiiiiiiii.............
[00:50:06] failures:
[00:50:06] 
[00:50:06] ---- [ui] ui/feature-gate-trivial_bounds.rs stdout ----
[00:50:06] diff of stderr:
[00:50:06] diff of stderr:
[00:50:06] 
[00:50:06] 38   --> $DIR/feature-gate-trivial_bounds.rs:30:1
[00:50:06] 39    |
[00:50:06] 40 LL | / impl Foo for () where i32: Foo { //~ ERROR
[00:50:06] - LL | |     fn test(&self) {
[00:50:06] + LL | |     fn test(&self) { //~ ERROR
[00:50:06] 42 LL | |         3i32.test();
[00:50:06] 43 LL | |         Foo::test(&4i32);
[00:50:06] 44 LL | |         generic_function(5i32);
[00:50:06] 97    = help: see issue #48214
[00:50:06] 97    = help: see issue #48214
[00:50:06] 98    = help: add #![feature(trivial_bounds)] to the crate attributes to enable
[00:50:06] 99 
[00:50:06] + error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied
[00:50:06] +   --> $DIR/feature-gate-trivial_bounds.rs:62:16
[00:50:06] +    |
[00:50:06] + LL | struct TwoStrs(str, str) where str: Sized; //~ ERROR
[00:50:06] +    |                ^^^ `str` does not have a constant size known at compile-time
[00:50:06] +    |
[00:50:06] +    = help: the trait `std::marker::Sized` is not implemented for `str`
[00:50:06] +    = note: only the last field of a s   |
[00:50:06] + note: required by `Foo`
[00:50:06] +   --> $DIR/feature-gate-trivial_bounds.rs:14:1
[00:50:06] +    |
[00:50:06] + LL | pub trait Foo {
[00:50:06] + 
[00:50:06] + error: aborting due to 13 previous errors
[00:50:06] 126 
[00:50:06] 127 For more information about this error, try `rustc --explain E0277`.
[00:50:06] 127 For more information about this error, try `rustc --explain E0277`.
[00:50:06] 128 
[00:50:06] 
[00:50:06] 
[00:50:06] The actual stderr differed from the expected stderr.
[00:50:06] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/feature-gate-trivial_bounds/feature-gate-trivial_bounds.stderr
[00:50:06] To update references, rerun the tests and pass the `--bless` flag
[00:50:06] To only update this specific test, also pass `--test-args feature-gate-trivial_bounds.rs`
[00:50:06] error: 1 errors occurred comparing output.
[00:50:06] status: exit code: 101
[00:50:06] status: exit code: 101
[00:50:06] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/feature-gate-trivial_bounds.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/feature-gate-trivial_bounds/a" "-Crpath" "-O" "-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/feature-gate-trivial_bounds/auxiliary" "-A" "unused"
[00:50:06] ------------------------------------------
[00:50:06] 
[00:50:06] ------------------------------------------
[00:50:06] stderr:
[00:50:06] stderr:
[00:50:06] ------------------------------------------
[00:50:06] {"message":"the trait bound `i32: Foo` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":592,"byte_end":619,"line_start":20,"line_end":20,"column_start":1,"column_end":28,"is_primary":true,"text":[{"text":"enum E where i32: Foo { V } //~ ERROR","highlight_start":1,"highlight_end":28}],"label":"the trait `Foo` is not implemented for `i32`","suggested_replacement":null,"expansion":null}],"children":[{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `i32: Foo` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:20:1\n   |\nLL | enum E where i32: Foo { V } //~ ERROR\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`\n   |\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `i32: Foo` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":631,"byte_end":655,"line_start":22,"line_end":22,"column_start":1,"column_end":25,"is_primary":true,"text":[{"text":"struct S where i32: Foo; //~ ERROR","highlight_start":1,"highlight_end":25}],"label":"the trait `Foo` is not implemented for `i32`","suggested_replacement":null,"expansion":null}],"children":[{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `i32: Foo` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:22:1\n   |\nLL | struct S where i32: Foo; //~ ERROR\n   | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`\n   |\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `i32: Foo` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 to` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:24:1\n   |\nLL | trait T where i32: Foo {} //~ ERROR\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`\n   |\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `i32: Foo` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":704,"byte_end":737,"line_start":26,"line_end":26,"column_start":1,"column_end":34,"is_primary":true,"text":[{"text":"union U where i32: Foo { f: i32 } //~ ERROR","highlight_start":1,"highlight_end":34}],"label":"the trait `Foo` is not implemented for `i32`","suggested_replacement":null,"expansion":null}],"children":[{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `i32: Foo` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:26:1\n   |\nLL | union U where i32: Foo { f: i32 } //~ ERROR\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`\n   |\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `i32: Foo` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":803,"byte_end":963,"line_start":30,"line_end":36,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"impl Foo for () where i32: Foo { //~ ERROR","highlight_start":1,"highlight_end":43},{"text":"    fn test(&self) { //~ ERROR","highlight_start":1,"highlight_end":31},{"text":"        3i32.test();","highlight_start":1,"highlight_end":21},{"text":"        Foo::test(&4i32);","highlight_start":1,"highlight_end":26},{"text":"        generic_function(5i32);","highlight_start":1,"highlight_end":32},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":"the trait `Foo` is not implemented for `i32`","suggested_replacement":null,"expansion":null}],"children":[{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `i32: Foo` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:30:1\n   |\nLL | / impl Foo for () where i32: Foo { //~ ERROR\nLL | |     fn test(&self) { //~ ERROR\nLL | |         3i32.test();\nLL | |         Foo::test(&4i32);\nLL | |         generic_function(5i32);\nLL | |     }\nLL | | }\n   | |_^ the trait `Foo` is not implemented for `i32`\n   |\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `i32: Foo` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":965,"byte_end":1082,"line_start":38,"line_end":44,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn f() where i32: Foo //~ ERROR","highlight_start":1,"highlight_end":32},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    let s = S;","highlight_start":1,"highlight_end":15},{"text":"    3i32.test();","highlight_start":1,"highlight_end":17},{"text":"    Foo::test(&4i32);","highlight_start":1,"highlight_end":22},{"text":"    generic_function(5i32);","highlight_start":1,"highlight_end":28},{"text":"}","highlight_start":1,"highlight_end":2}],"label":"the trait `Foo` is not implemented for `i32`","suggested_replacement":null,"expansion":null}],"children":[{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `i32: Foo` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:38:1\n   |\nLL | / fn f() where i32: Foo //~ ERROR\nLL | | {\nLL | |     let s = S;\nLL | |     3i32.test();\nLL | |     Foo::test(&4i32);\nLL | |     generic_function(5i32);\nLL | | }\n   | |_^ the trait `Foo` is not implemented for `i32`\n   |\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `std::string::String: std::ops::Neg` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of theendered":"error[E0277]: the trait bound `std::string::String: std::ops::Neg` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:46:1\n   |\nLL | / fn use_op(s: String) -> String where String: ::std::ops::Neg<Output=String> { //~ ERROR\nLL | |     -s\nLL | | }\n   | |_^ the trait `std::ops::Neg` is not implemented for `std::string::String`\n   |\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `i32: std::iter::Iterator` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example wo"`i32` is not an iterator; maybe try calling `.iter()` or a similar method","suggested_replacement":null,"expansion":null}],"children":[{"message":"the trait `std::iter::Iterator` is not implemented for `i32`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `i32: std::iter::Iterator` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:50:1\n   |\nLL | / fn use_for() where i32: Iterator { //~ ERROR\nLL | |     for _ in 2i32 {}\nLL | | }\n   | |_^ `i32` is not an iterator; maybe try calling `.iter()` or a similar method\n   |\n   = help: the trait `std::iter::Iterator` is not implemented for `i32`\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `str: std::marker::Sized` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":1319,"byte_end":1361,"line_start":62,"line_end":62,"column_start":1,"column_end":43,"is_primary":true,"text":[{"text":"struct TwoStrs(str, str) where str: Sized; //~ ERROR","highlight_start":1,"highlight_end":43}],"label":"`str` does not have a constant size known at compile-time","suggested_replacement":null,"expansion":null}],"children":[{"message":"the trait `std::marker::Sized` is not implemented for `str`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:62:1\n   |\nLL | struct TwoStrs(str, str) where str: Sized; //~ ERROR\n   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `str` does not have a constant size known at compile-time\n   |\n   = help: the trait `std::marker::Sized` is not implemented for `str`\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `str: std::marker::Sized` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":1334,"byte_end":1337,"line_start":62,"line_end":62,"column_start":16,"column_end":19,"is_primary":true,"text":[{"text":"struct TwoStrs(str, str) where str: Sized; //~ ERROR","highlight_start":16,"highlight_end":19}],"label":"`str` does not have a constant size known at compile-time","suggested_replacement":null,"expansion":null}],"children":[{"message":"the trait `std::marker::Sized` is not implemented for `str`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"only the last field of a struct may have a dynamically sized type","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:62:16\n   |\nLL | struct TwoStrs(str, str) where str: Sized; //~ ERROR\n   |                ^^^ `str` does not have a constant size known at compile-time\n   |\n   = help: the trait `std::marker::Sized` is not implemented for `str`\n   = note: only the last field of a struct may have a dynamically sized type\n\n"}
[00:50:06] {"message":"the trait bound `A + 'static: std::marker::Sized` is not satisfied in `Dst<A + 'static>`","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNo":"required because it appears within the type `Dst<A + 'static>`","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `A + 'static: std::marker::Sized` is not satisfied in `Dst<A + 'static>`\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:65:1\n   |\nLL | / fn unsized_local() where Dst<A>: Sized { //~ ERROR\nLL | |     let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);\nLL | | }\n   | |_^ `A + 'static` does not have a constant size known at compile-time\n   |\n   = help: within `Dst<A + 'static>`, the trait `std::marker::Sized` is not implemented for `A + 'static`\n   = note: required because it appears within the type `Dst<A + 'static>`\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `str: std::marker::Sized` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":1500,"byte_end":1595,"line_start":69,"line_end":71,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn return_str() -> str where str: Sized { //~ ERROR","highlight_start":1,"highlight_end":52},{"text":"    *\"Sized\".to_string().into_boxed_str()","highlight_start":1,"highlight_end":42},{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`str` does not have a constant size known at compile-time","suggested_replacement":null,"expansion":null}],"children":[{"message":"the trait `std::marker::Sized` is not implemented for `str`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"see issue #48214","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"add #![feature(trivial_bounds)] to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `str: std::marker::Sized` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:69:1\n   |\nLL | / fn return_str() -> str where str: Sized { //~ ERROR\nLL | |     *\"Sized\".to_string().into_boxed_str()\nLL | | }\n   | |_^ `str` does not have a constant size known at compile-time\n   |\n   = help: the trait `std::marker::Sized` is not implemented for `str`\n   = help: see issue #48214\n   = help: add #![feature(trivial_bounds)] to the crate attributes to enable\n\n"}
[00:50:06] {"message":"the trait bound `i32: Foo` is not satisfied","code":{"code":"E0277","explanation":"\nYou tried to use a type which doesn't implement some trait in a place which\nexpected that trait. Erroneous code example:\n\n```compile_fail,E0277\n// here we declare the Foo trait with a bar method\ntrait Foo {\n    fn bar(&self);\n}\n\n// we now declare a function which takes an object implementing the Foo trait\nfn some_func<T: Foo>(foo: T) {\n    foo.bar();\n}\n\nfn main() {\n    // we now call the method with the i32 type, which doesn't implement\n    // the Foo trait\n    some_func(5i32); // error: the trait bound `i32 : Foo` is not satisfied\n}\n```\n\nIn order to fix this error, verify that the type you're using does implement\nthe trait. Example:\n\n```\ntrait Foo {\n    fn bar(&self);\n}\n\nfn some_func<T: Foo>(foo: T) {\n    foo.bar(); // we can now use this method since i32 implements the\n               // Foo trait\n}\n\n// we implement the trait on the i32 type\nimpl Foo for i32 {\n    fn bar(&self) {}\n}\n\nfn main() {\n    some_func(5i32); // ok!\n}\n```\n\nOr in a generic context, an erroneous code example would look like:\n\n```compile_fail,E0277\nfn some_func<T>(foo: T) {\n    println!(\"{:?}\", foo); // error: the trait `core::fmt::Debug` is not\n                           //        implemented for the type `T`\n}\n\nfn main() {\n    // We now call the method with the i32 type,\n    // which *does* implement the Debug trait.\n    some_func(5i32);\n}\n```\n\nNote that the error here is in the definition of the generic function: Although\nwe only call it with a parameter that does implement `Debug`, the compiler\nstill rejects the function: It must work with all possible input types. In\norder to make this example compile, we need to restrict the generic type we're\naccepting:\n\n```\nuse std::fmt;\n\n// Restrict the input type to types that implement Debug.\nfn some_func<T: fmt::Debug>(foo: T) {\n    println!(\"{:?}\", foo);\n}\n\nfn main() {\n    // Calling the method is still fine, as i32 implements Debug.\n    some_func(5i32);\n\n    // This would fail to compile now:\n    // struct WithoutDebug;\n    // some_func(WithoutDebug);\n}\n```\n\nRust only looks at the signature of the called function, as such it must\nalready specify all requirements that will be used for every type parameter.\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":850,"byte_end":961,"line_start":31,"line_end":35,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    fn test(&self) { //~ ERROR","highlight_start":5,"highlight_end":31},{"text":"        3i32.test();","highlight_start":1,"highlight_end":21},{"text":"        Foo::test(&4i32);","highlight_start":1,"highlight_end":26},{"text":"        generic_function(5i32);","highlight_start":1,"highlight_end":32},{"text":"    }","highlight_start":1,"highlight_end":6}],"label":"the trait `Foo` is not implemented for `i32`","suggested_replacement":null,"expansion":null}],"children":[{"message":"required by `Foo`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/feature-gate-trivial_bounds.rs","byte_start":515,"byte_end":528,"line_start":14,"line_end":14,"column_start":1,"column_end":14,"is_primary":true,"text":[{"text":"pub trait Foo {","highlight_start":1,"highlight_end":14}],"label":null,"suggested_replacement":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error[E0277]: the trait bound `i32: Foo` is not satisfied\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:31:5\n   |\nLL | /     fn test(&self) { //~ ERROR\nLL | |         3i32.test();\nLL | |         Foo::test(&4i32);\nLL | |         generic_function(5i32);\nLL | |     }\n   | |_____^ the trait `Foo` is not implemented for `i32`\n   |\nnote: required by `Foo`\n  --> /checkout/src/test/ui/feature-gate-trivial_bounds.rs:14:1\n   |\nLL | pub trait Foo {\n   | ^^^^^^^^^^^^^\n\n"}
[00:50:06] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:50:06] {"message":"aborting due to 13 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 13 previous errors\n\n"}
[00:50:06] {"message":"For more information about this error, try `rustc --explain E0277`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0277`.\n"}
[00:50:06] ------------------------------------------
[00:50:06] 
[00:50:06] thread '[ui] ui/feature-gate-trivial_bounds.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3042:9
[00:50:06] note: Run with `RUST_BACKTRACE=1` for a backtrace.
---
[00:50:06] test result: FAILED. 1421 passed; 1 failed; 16 ignored; 0 measured; 0 filtered out
[00:50:06] 
[00:50:06] 
[00:50:06] 
[00:50:06] 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" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -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" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:50:06] 
[00:50:06] 
[00:50:06] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:50:06] Build completed unsuccessfully in 0:02:24
[00:50:06] Build completed unsuccessfully in 0:02:24
[00:50:06] make: *** [check] Error 1
[00:50:06] Makefile:58: recipe for target 'check' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0b749356
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

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)

@L-as
Copy link

L-as commented May 21, 2018

Will this be merged?

@nikomatsakis
Copy link
Contributor

@bors r+ p=2 -- fixing regression, important

@bors
Copy link
Contributor

bors commented May 21, 2018

📌 Commit aa56353 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 21, 2018
@bors
Copy link
Contributor

bors commented May 21, 2018

⌛ Testing commit aa56353 with merge 240d2edc701cde5d70aa5cd92ea4eb0986ce003f...

@bors
Copy link
Contributor

bors commented May 21, 2018

💔 Test failed - status-travis

@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 May 21, 2018
@rust-highfive

This comment has been minimized.

@kennytm
Copy link
Member

kennytm commented May 22, 2018

@bors retry Text file busy

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 22, 2018
@bors
Copy link
Contributor

bors commented May 22, 2018

⌛ Testing commit aa56353 with merge 1bbae5f...

bors added a commit that referenced this pull request May 22, 2018
…atsakis

Filter global bounds from ParamEnv again.

This PR adds back the filtering of global bounds from ParamEnv as a temporary solution for #50825.

<details>

Long term, the fix seems like it should be changing the priority in `candidate_should_be_dropped_in_favor_of` so that (global) where clauses aren't considered as highly.

https://github.com/rust-lang/rust/blob/a722296b6ec17fecd3f16a7d3f9232b83e5de800/src/librustc/traits/select.rs#L2017-L2022

</details>

r? @nikomatsakis
@rust-lang rust-lang deleted a comment from rust-highfive May 22, 2018
@bors
Copy link
Contributor

bors commented May 22, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 1bbae5f to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants