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

Avoid committing to autoderef in object method probing #57885

Merged
merged 3 commits into from Feb 9, 2019

Conversation

Projects
None yet
6 participants
@arielb1
Copy link
Contributor

arielb1 commented Jan 24, 2019

This fixes the "leak" introduced in #57835 (see test for details, also apparently #54252 had no tests for the "leaks" that were fixed in it, so go ahead and add one).

Maybe beta-nominating because regression, but I'm against landing things on beta we don't have to.

r? @nikomatsakis

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 25, 2019

@arielb1 I've been wondering about trying to move all of method selection to a canonical query. Have you thought about that at all?

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Jan 25, 2019

I'll rather talk a bit about it on Zulip.

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Jan 26, 2019

So I think the simpler approach to things I have found is actually sound, and I added a test for a few of the edge-cases that should pass (it passes today, and should continue passing).

I'll rewrite this PR when I have the time for that.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 26, 2019

The job x86_64-gnu-llvm-6.0 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.
travis_time:end:00a18200:start=1548539985716498917,finish=1548540060997837736,duration=75281338819
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[01:07:24] .................................................................................................... 3000/5351
[01:07:27] .................................................................................................... 3100/5351
[01:07:32] .................................................................................................... 3200/5351
[01:07:35] ............i....................................................................................... 3300/5351
[01:07:39] ..................................F...........................................ii...i..ii............ 3400/5351
[01:07:47] .................................................................................................... 3600/5351
[01:07:50] ..........................................................................ii........................ 3700/5351
[01:07:53] ............................................................................................i....... 3800/5351
[01:07:55] .................................................................................................... 3900/5351
---
[01:08:54] normalized stderr:
[01:08:54] error[E0308]: mismatched types
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:85:24
[01:08:54]    |
[01:08:54] LL |     let _seetype: () = z; //~ ERROR mismatched types
[01:08:54]    |                        ^ expected (), found u32
[01:08:54]    = note: expected type `()`
[01:08:54]               found type `u32`
[01:08:54] 
[01:08:54] error[E0308]: mismatched types
[01:08:54] error[E0308]: mismatched types
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:102:24
[01:08:54]    |
[01:08:54] LL |     let _seetype: () = z; //~ ERROR mismatched types
[01:08:54]    |                        ^ expected (), found u64
[01:08:54]    = note: expected type `()`
[01:08:54]               found type `u64`
[01:08:54] 
[01:08:54] error[E0034]: multiple applicable items in scope
[01:08:54] error[E0034]: multiple applicable items in scope
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:120:15
[01:08:54]    |
[01:08:54] LL |     let z = x.foo(); //~ ERROR multiple applicable items in scope
[01:08:54]    |               ^^^ multiple `foo` found
[01:08:54]    |
[01:08:54] note: candidate #1 is defined in an impl of the trait `internal::X` for the type `_`
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:43:9
[01:08:54]    |
[01:08:54] LL |         fn foo(self: Smaht<Self, u64>) -> u64 {
[01:08:54]    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[01:08:54] note: candidate #2 is defined in an impl of the trait `nuisance_foo::NuisanceFoo` for the type `_`
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:70:9
[01:08:54] LL |         fn foo(self) {}
[01:08:54]    |         ^^^^^^^^^^^^
[01:08:54]    |         ^^^^^^^^^^^^
[01:08:54] note: candidate #3 is defined in the trait `FinalFoo`
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:57:5
[01:08:54] LL |     fn foo(&self) -> u8;
[01:08:54]    |     ^^^^^^^^^^^^^^^^^^^^
[01:08:54]    |     ^^^^^^^^^^^^^^^^^^^^
[01:08:54]    = help: to disambiguate the method call, write `FinalFoo::foo(x)` instead
[01:08:54] error[E0308]: mismatched types
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:137:24
[01:08:54]    |
[01:08:54]    |
[01:08:54] LL |     let _seetype: () = z; //~ ERROR mismatched types
[01:08:54]    |                        ^ expected (), found u8
[01:08:54]    = note: expected type `()`
[01:08:54]               found type `u8`
[01:08:54] 
[01:08:54] error[E0308]: mismatched types
[01:08:54] error[E0308]: mismatched types
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:155:24
[01:08:54]    |
[01:08:54] LL |     let _seetype: () = z; //~ ERROR mismatched types
[01:08:54]    |                        ^ expected (), found u32
[01:08:54]    = note: expected type `()`
[01:08:54]               found type `u32`
[01:08:54] 
[01:08:54] error[E0308]: mismatched types
[01:08:54] error[E0308]: mismatched types
[01:08:54]   --> $DIR/method-deref-to-same-trait-object-with-separate-params.rs:172:24
[01:08:54]    |
[01:08:54] LL |     let _seetype: () = z; //~ ERROR mismatched types
[01:08:54]    |                        ^ expected (), found u32
[01:08:54]    = note: expected type `()`
[01:08:54]               found type `u32`
[01:08:54] 
[01:08:54] error: aborting due to 6 previous errors
[01:08:54] error: aborting due to 6 previous errors
[01:08:54] 
[01:08:54] Some errors occurred: E0034, E0308.
[01:08:54] For more information about an error, try `rustc --explain E0034`.
[01:08:54] 
[01:08:54] 
[01:08:54] 
[01:08:54] The actual stderr differed from the expected stderr.
[01:08:54] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/methods/method-deref-to-same-trait-object-with-separate-params/method-deref-to-same-trait-object-with-separate-params.stderr
[01:08:54] To update references, rerun the tests and pass the `--bless` flag
[01:08:54] To only update this specific test, also pass `--test-args methods/method-deref-to-same-trait-object-with-separate-params.rs`
[01:08:54] error: 1 errors occurred comparing output.
[01:08:54] status: exit code: 1
[01:08:54] status: exit code: 1
[01:08:54] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.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/methods/method-deref-to-same-trait-object-with-separate-params/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/methods/method-deref-to-same-trait-object-with-separate-params/auxiliary" "-A" "unused"
[01:08:54] ------------------------------------------
[01:08:54] 
[01:08:54] ------------------------------------------
[01:08:54] stderr:
[01:08:54] stderr:
[01:08:54] ------------------------------------------
[01:08:54] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":2116,"byte_end":2117,"line_start":85,"line_end":85,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    let _seetype: () = z; //~ ERROR mismatched types","highlight_start":24,"highlight_end":25}],"label":"expected (), found u32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `()`\n   found type `u32`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:85:24\n   |\nLL |     let _seetype: () = z; //~ ERROR mismatched types\n   |                        ^ expected (), found u32\n   |\n   = note: expected type `()`\n              found type `u32`\n\n"}
[01:08:54] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":2641,"byte_end":2642,"line_start":102,"line_end":102,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    let _seetype: () = z; //~ ERROR mismatched types","highlight_start":24,"highlight_end":25}],"label":"expected (), found u64","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `()`\n   found type `u64`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:102:24\n   |\nLL |     let _seetype: () = z; //~ ERROR mismatched types\n   |                        ^ expected (), found u64\n   |\n   = note: expected type `()`\n              found type `u64`\n\n"}
[01:08:54] {"message":"multiple applicable items in scope","code":{"code":"E0034","explanation":"\nThe compiler doesn't know what method to call because more than one method\nhas the same prototype. Erroneous code example:\n\n```compile_fail,E0034\nstruct Test;\n\ntrait Trait1 {\n    fn foo();\n}\n\ntrait Trait2 {\n    fn foo();\n}\n\nimpl Trait1 for Test { fn foo() {} }\nimpl Trait2 for Test { fn foo() {} }\n\nfn main() {\n    Test::foo() // error, which foo() to call?\n}\n```\n\nTo avoid this error, you have to keep only one of them and remove the others.\nSo let's take our example and fix it:\n\n```\nstruct Test;\n\ntrait Trait1 {\n    fn foo();\n}\n\nimpl Trait1 for Test { fn foo() {} }\n\nfn main() {\n    Test::foo() // and now that's good!\n}\n```\n\nHowever, a better solution would be using fully explicit naming of type and\ntrait:\n\n```\nstruct Test;\n\ntrait Trait1 {\n    fn foo();\n}\n\ntrait Trait2 {\n    fn foo();\n}\n\nimpl Trait1 for Test { fn foo() {} }\nimpl Trait2 for Test { fn foo() {} }\n\nfn main() {\n    <Test as Trait1>::foo()\n}\n```\n\nOne last example:\n\n```\ntrait F {\n    fn m(&self);\n}\n\ntrait G {\n    fn m(&self);\n}\n\nstruct X;\n\nimpl F for X { fn m(&self) { println!(\"I am F\"); } }\nimpl G for X { fn m(&self) { println!(\"I am G\"); } }\n\nfn main() {\n    let f = X;\n\n    F::m(&f); // it displays \"I am F\"\n    G::m(&f); // it displays \"I am G\"\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":3247,"byte_end":3250,"line_start":120,"line_end":120,"column_start":15,"column_end":18,"is_primary":true,"text":[{"text":"    let z = x.foo(); //~ ERROR multiple applicable items in scope","highlight_start":15,"highlight_end":18}],"label":"multiple `foo` found","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"candidate #1 is defined in an impl of the trait `internal::X` for the type `_`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":1253,"byte_end":1290,"line_start":43,"line_end":43,"column_start":9,"column_end":46,"is_primary":true,"text":[{"text":"        fn foo(self: Smaht<Self, u64>) -> u64 {","highlight_start":9,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"candidate #2 is defined in an impl of the trait `nuisance_foo::NuisanceFoo` for the type `_`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":1680,"byte_end":1692,"line_start":70,"line_end":70,"column_start":9,"column_end":21,"is_primary":true,"text":[{"text":"        fn foo(self) {}","highlight_start":9,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"candidate #3 is defined in the trait `FinalFoo`","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":1476,"byte_end":1496,"line_start":57,"line_end":57,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":"    fn foo(&self) -> u8;","highlight_start":5,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"to disambiguate the method call, write `FinalFoo::foo(x)` instead","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0034]: multiple applicable items in scope\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:120:15\n   |\nLL |     let z = x.foo(); //~ ERROR multiple applicable items in scope\n   |               ^^^ multiple `foo` found\n   |\nnote: candidate #1 is defined in an impl of the trait `internal::X` for the type `_`\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:43:9\n   |\nLL |         fn foo(self: Smaht<Self, u64>) -> u64 {\n   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nnote: candidate #2 is defined in an impl of the trait `nuisance_foo::NuisanceFoo` for the type `_`\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:70:9\n   |\nLL |         fn foo(self) {}\n   |         ^^^^^^^^^^^^\nnote: candidate #3 is defined in the trait `FinalFoo`\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:57:5\n   |\nLL |     fn foo(&self) -> u8;\n   |     ^^^^^^^^^^^^^^^^^^^^\n   = help: to disambiguate the method call, write `FinalFoo::foo(x)` instead\n\n"}
[01:08:54] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":3905,"byte_end":3906,"line_start":137,"line_end":137,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    let _seetype: () = z; //~ ERROR mismatched types","highlight_start":24,"highlight_end":25}],"label":"expected (), found u8","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `()`\n   found type `u8`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:137:24\n   |\nLL |     let _seetype: () = z; //~ ERROR mismatched types\n   |                        ^ expected (), found u8\n   |\n   = note: expected type `()`\n              found type `u8`\n\n"}
[01:08:54] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":4525,"byte_end":4526,"line_start":155,"line_end":155,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    let _seetype: () = z; //~ ERROR mismatched types","highlight_start":24,"highlight_end":25}],"label":"expected (), found u32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `()`\n   found type `u32`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:155:24\n   |\nLL |     let _seetype: () = z; //~ ERROR mismatched types\n   |                        ^ expected (), found u32\n   |\n   = note: expected type `()`\n              found type `u32`\n\n"}
[01:08:54] {"message":"mismatched types","code":{"code":"E0308","explanation":"\nThis error occurs when the compiler was unable to infer the concrete type of a\nvariable. It can occur for several cases, the most common of which is a\nmismatch in the expected type that the compiler inferred for a variable's\ninitializing expression, and the actual type explicitly assigned to the\nvariable.\n\nFor example:\n\n```compile_fail,E0308\nlet x: i32 = \"I am not a number!\";\n//     ~~~   ~~~~~~~~~~~~~~~~~~~~\n//      |             |\n//      |    initializing expression;\n//      |    compiler infers type `&str`\n//      |\n//    type `i32` assigned to variable `x`\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs","byte_start":5048,"byte_end":5049,"line_start":172,"line_end":172,"column_start":24,"column_end":25,"is_primary":true,"text":[{"text":"    let _seetype: () = z; //~ ERROR mismatched types","highlight_start":24,"highlight_end":25}],"label":"expected (), found u32","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"expected type `()`\n   found type `u32`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0308]: mismatched types\n  --> /checkout/src/test/ui/methods/method-deref-to-same-trait-object-with-separate-params.rs:172:24\n   |\nLL |     let _seetype: () = z; //~ ERROR mismatched types\n   |                        ^ expected (), found u32\n   |\n   = note: expected type `()`\n              found type `u32`\n\n"}
[01:08:54] {"message":"aborting due to 6 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 6 previous errors\n\n"}
[01:08:54] {"message":"Some errors occurred: E0034, E0308.","code":null,"level":"","spans":[],"children":[],"rendered":"Some errors occurred: E0034, E0308.\n"}
[01:08:54] 
[01:08:54] ------------------------------------------
[01:08:54] 
[01:08:54] thread '[ui] ui/methods/method-deref-to-same-trait-object-with-separate-params.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3287:9
---
[01:08:54] 
[01:08:54] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:495:22
[01:08:54] 
[01:08:54] 
[01:08:54] 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-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--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" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:08:54] 
[01:08:54] 
[01:08:54] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:08:54] Build completed unsuccessfully in 0:04:24
[01:08:54] Build completed unsuccessfully in 0:04:24
[01:08:54] Makefile:48: recipe for target 'check' failed
[01:08:54] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:12999b00
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Jan 26 23:10:06 UTC 2019
---
travis_time:end:128aec30:start=1548544207906249189,finish=1548544207911977778,duration=5728589
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:03ec39d6
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!chec

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)

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 28, 2019

@arielb1 is the "simpler approach" reflected in this PR now, or is that a new thing that you have yet to push?

arielb1 added some commits Jan 28, 2019

add tests to a few edge cases in method lookup
These aren't fixed by this PR, but were broken in a few older attempts
at it. Make sure they don't regress.

@arielb1 arielb1 force-pushed the arielb1:xform-probe branch from cb451a5 to 927d01f Jan 28, 2019

@arielb1 arielb1 changed the title [WIP] use canonical queries in trait object method probing Avoid committing to autoderef in object method probing Jan 28, 2019

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Jan 28, 2019

PR rewritten to use new and much-simpler approach. That's not what I had in mind at first, but it's even better.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Jan 29, 2019

@arielb1 in your earlier version of this PR, you said you didn't want to beta-nominate the first version you posted.

From skimming this (simpler) version, it seems like a reasonable thing to consider backporting this to beta. Do you still dislike the idea of backporting this? Or do you agree it would be worthwhile to backport this?

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Jan 29, 2019

@pnkfelix

I'm not quite sure. This looks simple enough, but it's subtle enough I'm not sure I want it to land on beta.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Jan 30, 2019

@arielb1 okay well then the followup question becomes: What is your opinion on landing PR #57835 without PR #57885, in order to resolve Issue #57673 before it hits stable?

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Jan 30, 2019

I'm actually ok with both options - the bug this PR fixes is quite a corner case.

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Jan 31, 2019

beta-nominating to ensure we discuss at weekly meeting (either today or at some point after this patch lands.)

@arielb1

This comment has been minimized.

Copy link
Contributor Author

arielb1 commented Feb 8, 2019

So @nikomatsakis told me I should r+ this myself.

@bors r=nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 8, 2019

📌 Commit 927d01f has been approved by nikomatsakis

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 9, 2019

⌛️ Testing commit 927d01f with merge 4c9233c...

bors added a commit that referenced this pull request Feb 9, 2019

Auto merge of #57885 - arielb1:xform-probe, r=nikomatsakis
Avoid committing to autoderef in object method probing

This fixes the "leak" introduced in #57835 (see test for details, also apparently #54252 had no tests for the "leaks" that were fixed in it, so go ahead and add one).

Maybe beta-nominating because regression, but I'm against landing things on beta we don't have to.

r? @nikomatsakis
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Feb 9, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: nikomatsakis
Pushing 4c9233c to master...

@bors bors added the merged-by-bors label Feb 9, 2019

@bors bors merged commit 927d01f into rust-lang:master Feb 9, 2019

1 check passed

homu Test successful
Details

bors added a commit that referenced this pull request Feb 17, 2019

Auto merge of #58537 - pietroalbini:beta-backports, r=pietroalbini
[beta] Rollup backports

Cherry-picked:

* #58207: Make `intern_lazy_const` actually intern its argument.
* #58161: Lower constant patterns with ascribed types.
* #57908: resolve: Fix span arithmetics in the import conflict error
* #57835: typeck: remove leaky nested probe during trait object method resolution
* #57885: Avoid committing to autoderef in object method probing
* #57646: Fixes text becoming invisible when element targetted

Rolled up:

* #58522: [BETA] Update cargo

r? @ghost

bors added a commit that referenced this pull request Feb 19, 2019

Auto merge of #58537 - pietroalbini:beta-backports, r=pietroalbini
[beta] Rollup backports

Cherry-picked:

* #58207: Make `intern_lazy_const` actually intern its argument.
* #58161: Lower constant patterns with ascribed types.
* #57908: resolve: Fix span arithmetics in the import conflict error
* #57835: typeck: remove leaky nested probe during trait object method resolution
* #57885: Avoid committing to autoderef in object method probing
* #57646: Fixes text becoming invisible when element targetted

Rolled up:

* #58522: [BETA] Update cargo

r? @ghost

bors added a commit that referenced this pull request Feb 19, 2019

Auto merge of #58537 - pietroalbini:beta-backports, r=pietroalbini
[beta] Rollup backports

Cherry-picked:

* #58207: Make `intern_lazy_const` actually intern its argument.
* #58161: Lower constant patterns with ascribed types.
* #57908: resolve: Fix span arithmetics in the import conflict error
* #57835: typeck: remove leaky nested probe during trait object method resolution
* #57885: Avoid committing to autoderef in object method probing
* #57646: Fixes text becoming invisible when element targetted

Rolled up:

* #58522: [BETA] Update cargo

r? @ghost

bors added a commit that referenced this pull request Feb 20, 2019

Auto merge of #58537 - pietroalbini:beta-backports, r=pietroalbini
[beta] Rollup backports

Cherry-picked:

* #58207: Make `intern_lazy_const` actually intern its argument.
* #58161: Lower constant patterns with ascribed types.
* #57908: resolve: Fix span arithmetics in the import conflict error
* #57835: typeck: remove leaky nested probe during trait object method resolution
* #57885: Avoid committing to autoderef in object method probing
* #57646: Fixes text becoming invisible when element targetted

Rolled up:

* #58522: [BETA] Update cargo

r? @ghost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.