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

Fix false "never constructed" warnings for Self:: variant paths (resolved conflict) #69377

Closed
wants to merge 2 commits into from

Conversation

seiyab
Copy link
Contributor

@seiyab seiyab commented Feb 22, 2020

Closes #64362.
Resolved conflict of original PR #64424

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @estebank (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

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

Your PR failed (pretty log, 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.
2020-02-22T14:36:10.6934281Z ========================== Starting Command Output ===========================
2020-02-22T14:36:10.6954354Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/2900ef50-7f80-4179-9f6b-7e289381ad77.sh
2020-02-22T14:36:10.9531267Z 
2020-02-22T14:36:10.9607118Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-22T14:36:10.9666909Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69377/merge to s
2020-02-22T14:36:10.9679014Z Task         : Get sources
2020-02-22T14:36:10.9679524Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-22T14:36:10.9680097Z Version      : 1.0.0
2020-02-22T14:36:10.9680503Z Author       : Microsoft
---
2020-02-22T14:36:13.5461946Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-22T14:36:13.5665117Z ##[command]git config gc.auto 0
2020-02-22T14:36:13.5679454Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-22T14:36:13.5717159Z ##[command]git config --get-all http.proxy
2020-02-22T14:36:13.5802055Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69377/merge:refs/remotes/pull/69377/merge
2020-02-22T14:36:15.1945296Z fatal: remote error: upload-pack: not our ref 9476f64a5e0e8e2e3084d5d6e9c270eb4e62e369
2020-02-22T14:36:15.2120826Z fatal: the remote end hung up unexpectedly
2020-02-22T14:36:15.2801653Z ##[warning]Git fetch failed with exit code 128, back off 9.268 seconds before retry.
2020-02-22T14:36:24.4997823Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69377/merge:refs/remotes/pull/69377/merge
---
2020-02-22T14:40:36.7641160Z E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2020-02-22T14:40:36.7683728Z 
2020-02-22T14:40:36.7722720Z ##[error]Bash exited with code '100'.
2020-02-22T14:40:36.7747626Z ##[section]Finishing: Install awscli
2020-02-22T14:40:36.7812921Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69377/merge to s
2020-02-22T14:40:36.7817741Z Task         : Get sources
2020-02-22T14:40:36.7818073Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-22T14:40:36.7818385Z Version      : 1.0.0
2020-02-22T14:40:36.7818611Z Author       : Microsoft
2020-02-22T14:40:36.7818611Z Author       : Microsoft
2020-02-22T14:40:36.7819135Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-22T14:40:36.7819542Z ==============================================================================
2020-02-22T14:40:37.1252874Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-22T14:40:37.1295146Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69377/merge to s
2020-02-22T14:40:37.1376523Z Cleaning up task key
2020-02-22T14:40:37.1377604Z Start cleaning up orphan processes.
2020-02-22T14:40:37.1542836Z Terminate orphan process: pid (3990) (python)
2020-02-22T14:40:37.1671473Z ##[section]Finishing: Finalize Job

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)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, 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.
2020-02-22T15:48:26.1043835Z ========================== Starting Command Output ===========================
2020-02-22T15:48:26.1048183Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/45a2541a-d2db-4ece-b9d4-fa1302d67113.sh
2020-02-22T15:48:26.1048645Z 
2020-02-22T15:48:26.1054861Z ##[section]Finishing: Disable git automatic line ending conversion
2020-02-22T15:48:26.1077161Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69377/merge to s
2020-02-22T15:48:26.1081004Z Task         : Get sources
2020-02-22T15:48:26.1081269Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-22T15:48:26.1081644Z Version      : 1.0.0
2020-02-22T15:48:26.1081819Z Author       : Microsoft
---
2020-02-22T15:48:27.3743238Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-02-22T15:48:27.3752997Z ##[command]git config gc.auto 0
2020-02-22T15:48:27.3759271Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-02-22T15:48:27.3766558Z ##[command]git config --get-all http.proxy
2020-02-22T15:48:27.3778067Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69377/merge:refs/remotes/pull/69377/merge
---
2020-02-22T16:48:30.8720690Z .................................................................................................... 1700/9695
2020-02-22T16:48:35.2857675Z .................................................................................................... 1800/9695
2020-02-22T16:48:46.3662627Z ..........................................i......................................................... 1900/9695
2020-02-22T16:48:53.8849767Z .................................................................................................... 2000/9695
2020-02-22T16:49:07.2697963Z ................................iiiii............................................................... 2100/9695
2020-02-22T16:49:16.9240488Z .................................................................................................... 2300/9695
2020-02-22T16:49:19.1643516Z .................................................................................................... 2400/9695
2020-02-22T16:49:23.3551059Z .................................................................................................... 2500/9695
2020-02-22T16:49:43.1133464Z .................................................................................................... 2600/9695
---
2020-02-22T16:52:15.3896076Z ........i........................................................................................... 5000/9695
2020-02-22T16:52:23.9064421Z .................................................................................................... 5100/9695
2020-02-22T16:52:28.3969228Z ...................................i................................................................ 5200/9695
2020-02-22T16:52:37.7452861Z .................................................................................................... 5300/9695
2020-02-22T16:52:43.2135451Z ...........ii.ii........i...i....................................................................... 5400/9695
2020-02-22T16:52:50.9969265Z .................................................................................................... 5600/9695
2020-02-22T16:53:01.1170505Z .................................................................................................... 5700/9695
2020-02-22T16:53:08.1624672Z ..i................................................................................................. 5800/9695
2020-02-22T16:53:13.3172829Z .................................................................................................... 5900/9695
2020-02-22T16:53:13.3172829Z .................................................................................................... 5900/9695
2020-02-22T16:53:22.7762875Z .............................................................................................ii...i. 6000/9695
2020-02-22T16:53:33.9392318Z .ii...........i..................................................................................... 6100/9695
2020-02-22T16:53:49.4800460Z .................................................................................................... 6300/9695
2020-02-22T16:53:55.6133086Z .................................................................................................... 6400/9695
2020-02-22T16:53:55.6133086Z .................................................................................................... 6400/9695
2020-02-22T16:54:13.0792751Z ........................i..ii....................................................................... 6500/9695
2020-02-22T16:54:33.1921858Z .................................................................................................... 6700/9695
2020-02-22T16:54:35.2737345Z ................i................................................................................... 6800/9695
2020-02-22T16:54:37.4037683Z .................................................................................................... 6900/9695
2020-02-22T16:54:39.7252435Z ......................................i............................................................. 7000/9695
---
2020-02-22T16:56:15.6975584Z .................................................................................................... 7700/9695
2020-02-22T16:56:20.4856461Z .................................................................................................... 7800/9695
2020-02-22T16:56:26.4305312Z ..................................................................................i................. 7900/9695
2020-02-22T16:56:34.9047064Z .................................................................................................... 8000/9695
2020-02-22T16:56:41.3928863Z ...............................iiiiiii.i............................................................ 8100/9695
2020-02-22T16:56:55.0460431Z .................................................................................................... 8300/9695
2020-02-22T16:57:03.1370638Z .................................................................................................... 8400/9695
2020-02-22T16:57:16.0752188Z .................................................................................................... 8500/9695
2020-02-22T16:57:22.6297878Z .................................................................................................... 8600/9695
---
2020-02-22T16:59:11.6416194Z ---- [ui] ui/impl-trait/bound-normalization-pass.rs stdout ----
2020-02-22T16:59:11.6416766Z 
2020-02-22T16:59:11.6417256Z error: test compilation failed although it shouldn't!
2020-02-22T16:59:11.6417536Z status: exit code: 101
2020-02-22T16:59:11.6420060Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/impl-trait/bound-normalization-pass.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/bound-normalization-pass" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-A" "unused" "--edition=2018" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/impl-trait/bound-normalization-pass/auxiliary"
2020-02-22T16:59:11.6422182Z ------------------------------------------
2020-02-22T16:59:11.6422368Z 
2020-02-22T16:59:11.6422754Z ------------------------------------------
2020-02-22T16:59:11.6422988Z stderr:
---
2020-02-22T16:59:11.6425198Z    |            ^^^^^^^^^^^^^^^^^^^^^^
2020-02-22T16:59:11.6425392Z    |
2020-02-22T16:59:11.6425778Z    = note: `#[warn(incomplete_features)]` on by default
2020-02-22T16:59:11.6425998Z 
2020-02-22T16:59:11.6427303Z error: internal compiler error: src/librustc/ty/context.rs:210: node type T::Assoc (hir_id=HirId { owner: DefIndex(43), local_id: 1 }) with HirId::owner DefId(0:43 ~ bound_normalization_pass[317d]::impl_trait_in_bindings[0]::foo[0]::{{opaque}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0:41 ~ bound_normalization_pass[317d]::impl_trait_in_bindings[0]::foo[0])
2020-02-22T16:59:11.6428838Z thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:881:9
2020-02-22T16:59:11.6429243Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-02-22T16:59:11.6429489Z 
2020-02-22T16:59:11.6429733Z note: the compiler unexpectedly panicked. this is a bug.
2020-02-22T16:59:11.6429733Z note: the compiler unexpectedly panicked. this is a bug.
2020-02-22T16:59:11.6429939Z 
2020-02-22T16:59:11.6430646Z note: we would appreciate a bug report: ***/blob/master/CONTRIBUTING.md#bug-reports
2020-02-22T16:59:11.6430946Z 
2020-02-22T16:59:11.6431473Z note: rustc 1.43.0-nightly (33b44d242 2020-02-22) running on x86_64-unknown-linux-gnu
2020-02-22T16:59:11.6431734Z 
2020-02-22T16:59:11.6432393Z note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0
2020-02-22T16:59:11.6433418Z error: aborting due to previous error
2020-02-22T16:59:11.6433594Z 
2020-02-22T16:59:11.6433694Z 
2020-02-22T16:59:11.6434214Z ------------------------------------------
---
2020-02-22T16:59:11.6461198Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-02-22T16:59:11.6461654Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-02-22T16:59:11.6473049Z 
2020-02-22T16:59:11.6473488Z 
2020-02-22T16:59:11.6477646Z 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-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -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" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-02-22T16:59:11.6480963Z 
2020-02-22T16:59:11.6481067Z 
2020-02-22T16:59:11.6485641Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-02-22T16:59:11.6486197Z Build completed unsuccessfully in 1:04:52
2020-02-22T16:59:11.6486197Z Build completed unsuccessfully in 1:04:52
2020-02-22T16:59:11.6538259Z == clock drift check ==
2020-02-22T16:59:11.6557906Z   local time: Sat Feb 22 16:59:11 UTC 2020
2020-02-22T16:59:11.9483865Z   network time: Sat, 22 Feb 2020 16:59:11 GMT
2020-02-22T16:59:11.9487087Z == end clock drift check ==
2020-02-22T16:59:12.4227900Z 
2020-02-22T16:59:12.4311837Z ##[error]Bash exited with code '1'.
2020-02-22T16:59:12.4325627Z ##[section]Finishing: Run build
2020-02-22T16:59:12.4372701Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69377/merge to s
2020-02-22T16:59:12.4377548Z Task         : Get sources
2020-02-22T16:59:12.4377877Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-02-22T16:59:12.4378186Z Version      : 1.0.0
2020-02-22T16:59:12.4378420Z Author       : Microsoft
2020-02-22T16:59:12.4378420Z Author       : Microsoft
2020-02-22T16:59:12.4378930Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-02-22T16:59:12.4379336Z ==============================================================================
2020-02-22T16:59:12.7525224Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-02-22T16:59:12.7568102Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69377/merge to s
2020-02-22T16:59:12.7663019Z Cleaning up task key
2020-02-22T16:59:12.7664434Z Start cleaning up orphan processes.
2020-02-22T16:59:12.7829587Z Terminate orphan process: pid (3655) (python)
2020-02-22T16:59:12.8048699Z ##[section]Finishing: Finalize Job

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)

@seiyab
Copy link
Contributor Author

seiyab commented Feb 23, 2020

Failure is reproduced also on my machine.
I misunderstood the way to test a compiler.
I'll try to fix.

@seiyab
Copy link
Contributor Author

seiyab commented Mar 1, 2020

I may stuck.
Is this because the feature impl_trait_in_bindings is incomplete ... ?
I'll read rustc code more for the time being.

@JohnCSimon JohnCSimon added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2020
@estebank
Copy link
Contributor

Try running the test that is failing in isolation with your built rustc. When doing so, set RUST_BACKTRACE=1 so that you can see the backtrace of where the error is coming from.

I believe what might be happening is that let res = self.tables.qpath_res(qpath, id); gives you a Res corresponding to the original crate, and not its local import. I am not entirely sure how to help with this, I'll have to dig deeper. @petrochenkov might have better insight on how to proceed here.

@seiyab
Copy link
Contributor Author

seiyab commented Mar 12, 2020

Thank you for your comment.

In my interpretation, let res = self.tables.qpath_res(qpath, id); searches on the TypeckTable of owner fn foo ... but it requires to search on the TypeckTable of owner impl FooLike<Output = T::Assoc> .

Here is output of --hir-tree where I think to be related
Crate {
    ...
    items: {
        ...
        HirId {
            owner: DefIndex(32),
            local_id: 0,
        }: Item {
            ident: impl_trait_in_bindings#0,
            hir_id: HirId {
                owner: DefIndex(32),
                local_id: 0,
            },
            attrs: [],
            kind: Mod(
                Mod {
                    inner: $DIR/bound-normalization-pass.rs:62:5: 77:2,
                    item_ids: [
                        ...
                        ItemId {
                            id: HirId {
                                owner: DefIndex(39),
                                local_id: 0,
                            },
                        },
                        ItemId {
                            id: HirId {
                                owner: DefIndex(41),
                                local_id: 0,
                            },
                        },
                    ],
                },
            ),
            vis: Spanned {
                node: Inherited,
                span: $DIR/bound-normalization-pass.rs:61:1: 61:1,
            },
            span: $DIR/bound-normalization-pass.rs:61:1: 77:2,
        },
        ...
        HirId {
            owner: DefIndex(41),
            local_id: 0,
        }: Item {
            ident: foo#0,
            hir_id: HirId {
                owner: DefIndex(41),
                local_id: 0,
            },
            attrs: [],
            kind: Fn(
                FnSig {
                    header: FnHeader {
                        unsafety: Normal,
                        constness: NotConst,
                        asyncness: NotAsync,
                        abi: Rust,
                    },
                    decl: FnDecl {
                        inputs: [],
                        output: DefaultReturn(
                            $DIR/bound-normalization-pass.rs:74:35: 74:35,
                        ),
                        c_variadic: false,
                        implicit_self: None,
                    },
                },
                Generics {
                    params: [
                        GenericParam {
                            hir_id: HirId {
                                owner: DefIndex(41),
                                local_id: 15,
                            },
                            name: Plain(
                                T#0,
                            ),
                            attrs: [],
                            bounds: [
                                Trait(
                                    PolyTraitRef {
                                        bound_generic_params: [],
                                        trait_ref: TraitRef {
                                            path: path(Trait<Assoc = u32>),
                                            hir_ref_id: HirId {
                                                owner: DefIndex(41),
                                                local_id: 14,
                                            },
                                        },
                                        span: $DIR/bound-normalization-pass.rs:74:15: 74:31,
                                    },
                                    None,
                                ),
                            ],
                            span: $DIR/bound-normalization-pass.rs:74:12: 74:13,
                            pure_wrt_drop: false,
                            kind: Type {
                                default: None,
                                synthetic: None,
                            },
                        },
                    ],
                    where_clause: WhereClause {
                        predicates: [],
                        span: $DIR/bound-normalization-pass.rs:74:34: 74:34,
                    },
                    span: $DIR/bound-normalization-pass.rs:74:11: 74:32,
                },
                BodyId {
                    hir_id: HirId {
                        owner: DefIndex(41),
                        local_id: 9,
                    },
                },
            ),
            vis: Spanned {
                node: Inherited,
                span: $DIR/bound-normalization-pass.rs:74:5: 74:5,
            },
            span: $DIR/bound-normalization-pass.rs:74:5: 76:6,
        },
        HirId {
            owner: DefIndex(43),
            local_id: 0,
        }: Item {
            ident: #0,
            hir_id: HirId {
                owner: DefIndex(43),
                local_id: 0,
            },
            attrs: [],
            kind: OpaqueTy(
                OpaqueTy {
                    generics: Generics {
                        params: [],
                        where_clause: WhereClause {
                            predicates: [],
                            span: $DIR/bound-normalization-pass.rs:75:16: 75:45,
                        },
                        span: $DIR/bound-normalization-pass.rs:75:16: 75:45,
                    },
                    bounds: [
                        Trait(
                            PolyTraitRef {
                                bound_generic_params: [],
                                trait_ref: TraitRef {
                                    path: path(FooLike<Output = T::Assoc>),
                                    hir_ref_id: HirId {
                                        owner: DefIndex(43),
                                        local_id: 7,
                                    },
                                },
                                span: $DIR/bound-normalization-pass.rs:75:21: 75:45,
                            },
                            None,
                        ),
                    ],
                    impl_trait_fn: Some(
                        DefId(0:41 ~ bound_normalization_pass[317d]::impl_trait_in_bindings[0]::foo[0]),
                    ),
                    origin: Misc,
                },
            ),
            vis: Spanned {
                node: Inherited,
                span: $DIR/bound-normalization-pass.rs:75:16: 75:16,
            },
            span: $DIR/bound-normalization-pass.rs:75:16: 75:45,
        },
        ...
    },
    trait_items: {
        ...
        TraitItemId {
            hir_id: HirId {
                owner: DefIndex(36),
                local_id: 0,
            },
        }: TraitItem {
            ident: Output#0,
            hir_id: HirId {
                owner: DefIndex(36),
                local_id: 0,
            },
            attrs: [],
            generics: Generics {
                params: [],
                where_clause: WhereClause {
                    predicates: [],
                    span: $DIR/bound-normalization-pass.rs:64:32: 64:32,
                },
                span: $DIR/bound-normalization-pass.rs:64:32: 64:32,
            },
            kind: Type(
                [],
                None,
            ),
            span: $DIR/bound-normalization-pass.rs:64:21: 64:33,
        },
        TraitItemId {
            hir_id: HirId {
                owner: DefIndex(40),
                local_id: 0,
            },
        }: TraitItem {
            ident: Assoc#0,
            hir_id: HirId {
                owner: DefIndex(40),
                local_id: 0,
            },
            attrs: [],
            generics: Generics {
                params: [],
                where_clause: WhereClause {
                    predicates: [],
                    span: $DIR/bound-normalization-pass.rs:71:19: 71:19,
                },
                span: $DIR/bound-normalization-pass.rs:71:19: 71:19,
            },
            kind: Type(
                [],
                None,
            ),
            span: $DIR/bound-normalization-pass.rs:71:9: 71:20,
        },
        ...
    },
    impl_items: {
        ...
        ImplItemId {
            hir_id: HirId {
                owner: DefIndex(38),
                local_id: 0,
            },
        }: ImplItem {
            ident: Output#0,
            hir_id: HirId {
                owner: DefIndex(38),
                local_id: 0,
            },
            vis: Spanned {
                node: Inherited,
                span: $DIR/bound-normalization-pass.rs:67:9: 67:9,
            },
            defaultness: Final,
            attrs: [],
            generics: Generics {
                params: [],
                where_clause: WhereClause {
                    predicates: [],
                    span: $DIR/bound-normalization-pass.rs:67:20: 67:20,
                },
                span: $DIR/bound-normalization-pass.rs:67:20: 67:20,
            },
            kind: TyAlias(
                type(u32),
            ),
            span: $DIR/bound-normalization-pass.rs:67:9: 67:27,
        },
        ...
    },
    bodies: {
        BodyId {
            hir_id: HirId {
                owner: DefIndex(41),
                local_id: 9,
            },
        }: Body {
            params: [],
            value: expr(HirId { owner: DefIndex(41), local_id: 9 }: { let _:  = Foo; }),
            generator_kind: None,
        },
    },
    trait_impls: {
        ...
        DefId(0:45 ~ bound_normalization_pass[317d]::opaque_types[0]::Implemented[0]): [
            HirId {
                owner: DefIndex(47),
                local_id: 0,
            },
        ],
        ...
    },
    body_ids: [
        ...
        BodyId {
            hir_id: HirId {
                owner: DefIndex(41),
                local_id: 9,
            },
        },
        ...
    ],
    modules: {
        ...
        HirId {
            owner: DefIndex(32),
            local_id: 0,
        }: ModuleItems {
            items: {
                ...
                HirId {
                    owner: DefIndex(41),
                    local_id: 0,
                },
                HirId {
                    owner: DefIndex(43),
                    local_id: 0,
                },
            },
            trait_items: {
                TraitItemId {
                    hir_id: HirId {
                        owner: DefIndex(36),
                        local_id: 0,
                    },
                },
                TraitItemId {
                    hir_id: HirId {
                        owner: DefIndex(40),
                        local_id: 0,
                    },
                },
            },
            ...
        },
        ...
    },
    proc_macros: [],
}

error: internal compiler error: src/librustc/ty/context.rs:210: node type T::Assoc (hir_id=HirId { owner: DefIndex(43), local_id: 1 }) with HirId::owner DefId(0:43 ~ bound_normalization_pass[317d]::impl_trait_in_bindings[0]::foo[0]::{{opaque}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0:41 ~ bound_normalization_pass[317d]::impl_trait_in_bindings[0]::foo[0])

All I found is I need understand rust and rustc more...

@seiyab
Copy link
Contributor Author

seiyab commented Mar 16, 2020

I'm still reading rustc code.
I think OpaqueTy becomes owner in HIR , but the Visitor seems not to update TypeckTable.

@JohnCSimon
Copy link
Member

Ping from triage:
@seiyab Can you post your status on this PR?
Thank you.

@seiyab
Copy link
Contributor Author

seiyab commented Mar 29, 2020

I stuck.

@seiyab
Copy link
Contributor Author

seiyab commented Mar 29, 2020

give me more two weeks.

@joelpalmer joelpalmer added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 6, 2020
@seiyab
Copy link
Contributor Author

seiyab commented Apr 11, 2020

I changed approach.
#71026

@seiyab seiyab closed this Apr 11, 2020
@seiyab seiyab deleted the issue-64362 branch April 12, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"variant is never constructed" lint appears to be incorrect?
6 participants