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

Merge `TraitItem` & `ImplItem into `AssocItem` #67131

Merged
merged 26 commits into from Dec 20, 2019
Merged

Conversation

@Centril
Copy link
Member

Centril commented Dec 7, 2019

In this PR we:

  • Merge {Trait,Impl}Item{Kind?} into AssocItem{Kind?} as discussed in #65041 (comment).

    • This is done by using the cover grammar of both forms.

    • In particular, it requires that we syntactically allow (under #[cfg(FALSE)]):

      • defaultness on trait items,

      • impl items without a body / definition (const, type, and fn),

      • and associated types in impls with bounds, e.g., type Foo: Ord;.

    • The syntactic restrictions are replaced by semantic ones in ast_validation.

  • Move syntactic restrictions around C-variadic parameters from the parser into ast_validation:

    • fns in all contexts now syntactically allow ...,

    • ... can occur anywhere in the list syntactically (fn foo(..., x: usize) {}),

    • and ... can be the sole parameter (fn foo(...) {}.

r? @petrochenkov

@rust-highfive

This comment was marked as resolved.

Copy link
Collaborator

rust-highfive commented Dec 8, 2019

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.
2019-12-07T23:29:18.3993819Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-07T23:29:18.4006937Z ##[command]git config gc.auto 0
2019-12-07T23:29:18.4010054Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-07T23:29:18.4012785Z ##[command]git config --get-all http.proxy
2019-12-07T23:29:18.4016050Z ##[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/67131/merge:refs/remotes/pull/67131/merge
---
2019-12-08T00:13:41.2931386Z .................................................................................................... 1600/9342
2019-12-08T00:13:44.5955948Z .................................................................................................... 1700/9342
2019-12-08T00:13:53.5030949Z ................................................i................................................... 1800/9342
2019-12-08T00:13:59.3443410Z .................................................................................................... 1900/9342
2019-12-08T00:14:09.6002445Z .................................iiiii.............................................................. 2000/9342
2019-12-08T00:14:16.9306604Z .................................................................................................... 2200/9342
2019-12-08T00:14:18.7096341Z .................................................................................................... 2300/9342
2019-12-08T00:14:21.8698766Z .................................................................................................... 2400/9342
2019-12-08T00:14:37.6329149Z .................................................................................................... 2500/9342
---
2019-12-08T00:16:37.2444583Z ...................................i...............i................................................ 4800/9342
2019-12-08T00:16:44.2558162Z .................................................................................................... 4900/9342
2019-12-08T00:16:49.3284708Z ...............................................................................i.................... 5000/9342
2019-12-08T00:16:53.8333683Z .................................................................................................... 5100/9342
2019-12-08T00:17:00.8076098Z ............................................ii.ii...........i....................................... 5200/9342
2019-12-08T00:17:07.6602378Z .................................................................................................... 5400/9342
2019-12-08T00:17:14.8479848Z .................................................................................................... 5500/9342
2019-12-08T00:17:20.1101964Z ..........................i......................................................................... 5600/9342
2019-12-08T00:17:24.6362781Z .................................................................................................... 5700/9342
2019-12-08T00:17:24.6362781Z .................................................................................................... 5700/9342
2019-12-08T00:17:33.1920531Z .................................................................................................... 5800/9342
2019-12-08T00:17:41.5691119Z .............ii...i..ii...........i................................................................. 5900/9342
2019-12-08T00:17:54.4142933Z .................................................................................................... 6100/9342
2019-12-08T00:17:58.5994115Z .................................................................................................... 6200/9342
2019-12-08T00:17:58.5994115Z .................................................................................................... 6200/9342
2019-12-08T00:18:08.2210664Z ....................................i..ii........................................................... 6300/9342
2019-12-08T00:18:23.7722043Z .................................................................................................... 6500/9342
2019-12-08T00:18:25.2823442Z ........i........................................................................................... 6600/9342
2019-12-08T00:18:27.0121533Z .................................................................................................... 6700/9342
2019-12-08T00:18:28.8709578Z .....i.............................................................................................. 6800/9342
---
2019-12-08T00:19:41.7019021Z .................................................................................................... 7400/9342
2019-12-08T00:19:45.3018250Z .................................................................................................... 7500/9342
2019-12-08T00:19:50.4241598Z .................................................................................................... 7600/9342
2019-12-08T00:19:58.0558228Z .................................................................................................... 7700/9342
2019-12-08T00:20:02.8219539Z ....................iiii............................................................................ 7800/9342
2019-12-08T00:20:13.2737154Z .................................................................................................... 8000/9342
2019-12-08T00:20:21.0786965Z .................................................................................................... 8100/9342
2019-12-08T00:20:30.8850206Z .................................................................................................... 8200/9342
2019-12-08T00:20:36.1383176Z .................................................................................................... 8300/9342
---
2019-12-08T00:22:19.1698575Z  finished in 4.428
2019-12-08T00:22:19.1698838Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-08T00:22:19.1698869Z 
2019-12-08T00:22:19.1698921Z running 165 tests
2019-12-08T00:22:20.9931005Z iiii......i.......ii..iiii...i.............................i..i..................i....i............i 100/165
2019-12-08T00:22:22.5729917Z .i.i...iii..iiiiiii.......................iii............ii......
2019-12-08T00:22:22.5734240Z 
2019-12-08T00:22:22.5738264Z  finished in 3.946
2019-12-08T00:22:22.5881842Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-08T00:22:22.7143937Z 
---
2019-12-08T00:22:24.1980508Z  finished in 1.609
2019-12-08T00:22:24.2121932Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-08T00:22:24.3286306Z 
2019-12-08T00:22:24.3286454Z running 9 tests
2019-12-08T00:22:24.3286945Z iiiiiiiii
2019-12-08T00:22:24.3287802Z 
2019-12-08T00:22:24.3290339Z  finished in 0.116
2019-12-08T00:22:24.3423581Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-08T00:22:24.4625312Z 
---
2019-12-08T00:22:38.6050257Z  finished in 14.262
2019-12-08T00:22:38.6194147Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-08T00:22:38.7375383Z 
2019-12-08T00:22:38.7375504Z running 124 tests
2019-12-08T00:22:56.7980747Z .iiiii..ii.....i..i...i..i.i.i..i..i..iii....ii.ii....ii..........iiii..........i.....i..ii.......ii 100/124
2019-12-08T00:22:59.8821340Z .i.iii.....iiiiii.....ii
2019-12-08T00:22:59.8822506Z 
2019-12-08T00:22:59.8822572Z  finished in 21.262
2019-12-08T00:22:59.8829223Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-08T00:22:59.8829534Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-12-08T00:31:21.2734508Z 
2019-12-08T00:31:21.2738846Z    Doc-tests core
2019-12-08T00:31:24.5881711Z 
2019-12-08T00:31:24.5882621Z running 2434 tests
2019-12-08T00:31:31.2952183Z ......iiiii......................................................................................... 100/2434
2019-12-08T00:31:45.4409576Z .................................................................................................... 300/2434
2019-12-08T00:31:53.3296705Z ..............i..................................................................................... 400/2434
2019-12-08T00:31:53.3296705Z ..............i..................................................................................... 400/2434
2019-12-08T00:32:00.1620225Z ..............................................................i..i..................iiii............ 500/2434
2019-12-08T00:32:12.4568471Z .................................................................................................... 700/2434
2019-12-08T00:32:18.8156647Z .................................................................................................... 800/2434
2019-12-08T00:32:25.2153046Z .................................................................................................... 900/2434
2019-12-08T00:32:31.5635761Z .................................................................................................... 1000/2434
---
2019-12-08T00:35:10.5428765Z .................................................................................................... 500/756
2019-12-08T00:35:10.5680361Z .............thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1189:5
2019-12-08T00:35:10.5699131Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1189:5
2019-12-08T00:35:10.5707360Z thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:1189:5
2019-12-08T00:35:10.5727434Z .......thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1189:5
2019-12-08T00:35:10.7467890Z ..........................................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1189:5
2019-12-08T00:35:10.7481400Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:1189:5
2019-12-08T00:35:10.7503262Z .thread '<unnamed>.' panicked at '.called `Result::unwrap()` on an `Err` value: RecvError.', .src/libcore/result.rs.:.1189thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libcore/result.rs:1189:5
2019-12-08T00:35:10.7722383Z ....................... 600/756
2019-12-08T00:35:12.7982602Z ..............thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:627:13
2019-12-08T00:35:12.7983013Z ...thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:582:13
2019-12-08T00:35:12.8017741Z ........thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:559:13
---
2019-12-08T00:35:21.6977266Z 
2019-12-08T00:35:21.7020249Z running 1003 tests
2019-12-08T00:35:34.7777474Z i................................................................................................... 100/1003
2019-12-08T00:35:42.1560105Z .................................................................................................... 200/1003
2019-12-08T00:35:47.8711125Z ..................iii......i......i...i......i...................................................... 300/1003
2019-12-08T00:35:50.8861366Z .................................................................................................... 400/1003
2019-12-08T00:35:55.8903045Z ..........................................i..i.....................................ii............... 500/1003
2019-12-08T00:36:05.2128280Z .................................................................................................... 700/1003
2019-12-08T00:36:05.2128280Z .................................................................................................... 700/1003
2019-12-08T00:36:09.9206733Z .............................iiii................................................................... 800/1003
2019-12-08T00:36:20.8130398Z .................................................................................................... 900/1003
2019-12-08T00:36:25.7756969Z ...................................................iiii............................................. 1000/1003
2019-12-08T00:36:25.8292603Z test result: ok. 983 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2019-12-08T00:36:25.8292690Z 
2019-12-08T00:36:25.8382963Z  finished in 136.062
2019-12-08T00:36:25.8396645Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2019-12-08T00:49:27.2636368Z 
2019-12-08T00:49:27.2636422Z failures:
2019-12-08T00:49:27.2636443Z 
2019-12-08T00:49:27.2636706Z ---- /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0743 (line 13312) stdout ----
2019-12-08T00:49:27.2636904Z error: only foreign or `unsafe extern "C" functions may be C-variadic
2019-12-08T00:49:27.2637163Z   |
2019-12-08T00:49:27.2637196Z 3 | fn foo2(x: u8, ...) {} // error!
2019-12-08T00:49:27.2637255Z   |                ^^^^
2019-12-08T00:49:27.2637277Z 
2019-12-08T00:49:27.2637277Z 
2019-12-08T00:49:27.2637458Z error[E0658]: C-variadic functions are unstable
2019-12-08T00:49:27.2637659Z  --> /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md:13313:1
2019-12-08T00:49:27.2637712Z   |
2019-12-08T00:49:27.2637744Z 3 | fn foo2(x: u8, ...) {} // error!
2019-12-08T00:49:27.2637783Z   | ^^^^^^^^^^^^^^^^^^^^^^
2019-12-08T00:49:27.2637829Z   |
2019-12-08T00:49:27.2638146Z   = note: for more information, see ***/issues/44930
2019-12-08T00:49:27.2638192Z   = help: add `#![feature(c_variadic)]` to the crate attributes to enable
2019-12-08T00:49:27.2638268Z error: aborting due to 2 previous errors
2019-12-08T00:49:27.2638290Z 
2019-12-08T00:49:27.2638493Z For more information about this error, try `rustc --explain E0658`.
2019-12-08T00:49:27.2638493Z For more information about this error, try `rustc --explain E0658`.
2019-12-08T00:49:27.2638552Z Some expected error codes were not found: ["E0743"]
2019-12-08T00:49:27.2638604Z failures:
2019-12-08T00:49:27.2638857Z     /checkout/obj/build/x86_64-unknown-linux-gnu/test/error-index.md - Rust_Compiler_Error_Index::E0743 (line 13312)
2019-12-08T00:49:27.2638887Z 
2019-12-08T00:49:27.2638922Z test result: FAILED. 797 passed; 1 failed; 28 ignored; 0 measured; 0 filtered out
---
2019-12-08T00:49:27.2639351Z   local time: Sun Dec  8 00:49:27 UTC 2019
2019-12-08T00:49:27.5048236Z   network time: Sun, 08 Dec 2019 00:49:27 GMT
2019-12-08T00:49:27.5049903Z == end clock drift check ==
2019-12-08T00:49:28.7806080Z 
2019-12-08T00:49:28.7880034Z ##[error]Bash exited with code '1'.
2019-12-08T00:49:28.7905255Z ##[section]Starting: Checkout
2019-12-08T00:49:28.7906781Z ==============================================================================
2019-12-08T00:49:28.7906826Z Task         : Get sources
2019-12-08T00:49:28.7906880Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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)

@Centril Centril force-pushed the Centril:item-merge branch from 37d459d to bf521fb Dec 8, 2019
@petrochenkov

This comment has been minimized.

Copy link
Contributor

petrochenkov commented Dec 8, 2019

r=me on the implementation.

Not sure whether this needs an FCP from the lang team or the consensus in #65041 (comment) is enough.

@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Dec 8, 2019

👋 @rust-lang/lang :)

@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Dec 10, 2019

I'm gonna interpret the radio silence here + general feeling about semantic vs. syntactic errors expressed in the past as "I have nothing new to add atop the existing consensus in #65041 (comment)". :)

@bors r=petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 10, 2019

📌 Commit bf521fb has been approved by petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 10, 2019

⌛️ Testing commit bf521fb with merge 0ecb374...

bors added a commit that referenced this pull request Dec 10, 2019
Merge `TraitItem` & `ImplItem into `AssocItem`

In this PR we:

- Merge `{Trait,Impl}Item{Kind?}` into `AssocItem{Kind?}` as discussed in #65041 (comment).

   - This is done by using the cover grammar of both forms.

   - In particular, it requires that we syntactically allow (under `#[cfg(FALSE)]`):

      - `default`ness on `trait` items,

      - `impl` items without a body / definition (`const`, `type`, and `fn`),

      - and associated `type`s in `impl`s with bounds, e.g., `type Foo: Ord;`.

   - The syntactic restrictions are replaced by semantic ones in `ast_validation`.

- Move syntactic restrictions around C-variadic parameters from the parser into `ast_validation`:

    - `fn`s in all contexts now syntactically allow `...`,

    - `...` can occur anywhere in the list syntactically (`fn foo(..., x: usize) {}`),

    - and `...` can be the sole parameter (`fn foo(...) {}`.

r? @petrochenkov
@eddyb

This comment has been minimized.

Copy link
Member

eddyb commented Dec 10, 2019

Could this PR allow the following (assuming delegate is some proc macro)?

struct Wrapper<T>(T);

#[delegate(self.0: T)]
impl<T> fmt::Debug for Wrapper<T> {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result;
}

Which could expand into:

struct Wrapper<T>(T);

impl<T> fmt::Debug for Wrapper<T>
    where T: fmt::Debug
{
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        fmt::Debug::fmt(&self.0, f)
    }
}

I guess you could do it before this PR too and just require an empty body or thereabouts, but being able to have an explicit ; seems slightly nicer.

@bors

This comment was marked as outdated.

Copy link
Contributor

bors commented Dec 10, 2019

💔 Test failed - checks-azure

@rust-highfive

This comment was marked as outdated.

Copy link
Collaborator

rust-highfive commented Dec 10, 2019

The job i686-mingw-2 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.
2019-12-10T13:46:28.2841007Z do so (now or later) by using -b with the checkout command again. Example:
2019-12-10T13:46:28.2841834Z 
2019-12-10T13:46:28.2842061Z   git checkout -b <new-branch-name>
2019-12-10T13:46:28.2842259Z 
2019-12-10T13:46:28.2842488Z HEAD is now at 0ecb374d1 Auto merge of #67131 - Centril:item-merge, r=petrochenkov
2019-12-10T13:46:28.3272478Z ##[section]Starting: Setup environment
2019-12-10T13:46:28.3401849Z ==============================================================================
2019-12-10T13:46:28.3401943Z Task         : Bash
2019-12-10T13:46:28.3402036Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-12-10T13:46:30.1641438Z 
2019-12-10T13:46:30.1641469Z 
2019-12-10T13:46:30.1641503Z 
2019-12-10T13:46:30.1641555Z 
2019-12-10T13:46:30.1641637Z       - `default`ness on `trait` items,
2019-12-10T13:46:30.1641753Z       - `impl` items without a body / definition (`const`, `type`, and `fn`),
2019-12-10T13:46:30.1641860Z       - and associated `type`s in `impl`s with bounds, e.g., `type Foo: Ord;`.
2019-12-10T13:46:30.1642021Z     - `...` can occur anywhere in the list syntactically (`fn foo(..., x: usize) {}`),
2019-12-10T13:46:30.1642135Z     - `fn`s in all contexts now syntactically allow `...`,
2019-12-10T13:46:30.1642226Z     - and `...` can be the sole parameter (`fn foo(...) {}`.
2019-12-10T13:46:30.1642340Z    - In particular, it requires that we syntactically allow (under `#[cfg(FALSE)]`):
2019-12-10T13:46:30.1642441Z    - The syntactic restrictions are replaced by semantic ones in `ast_validation`.
2019-12-10T13:46:30.1642553Z    - This is done by using the cover grammar of both forms.
2019-12-10T13:46:30.1642685Z - Merge `{Trait,Impl}Item{Kind?}` into `AssocItem{Kind?}` as discussed in https://github.com/rust-lang/rust/issues/65041#issuecomment-538105286.
2019-12-10T13:46:30.1642811Z - Move syntactic restrictions around C-variadic parameters from the parser into `ast_validation`:
2019-12-10T13:46:30.1643350Z AGENT_DISABLELOGPLUGIN_TESTFILEPUBLISHERPLUGIN=true
2019-12-10T13:46:30.1643997Z AGENT_DISABLELOGPLUGIN_TESTRESULTLOGPLUGIN=true
2019-12-10T13:46:30.1644097Z AGENT_HOMEDIRECTORY=C:\agents\2.160.1
2019-12-10T13:46:30.1644166Z AGENT_ID=516
---
2019-12-10T13:46:30.1654917Z BUILD_SOURCEBRANCHNAME=auto
2019-12-10T13:46:30.1654985Z BUILD_SOURCESDIRECTORY=D:\a\1\s
2019-12-10T13:46:30.1655120Z BUILD_SOURCEVERSION=0ecb374d13d500af84e0453ffde16d81cb97b52a
2019-12-10T13:46:30.1655211Z BUILD_SOURCEVERSIONAUTHOR=bors
2019-12-10T13:46:30.1655319Z BUILD_SOURCEVERSIONMESSAGE=Auto merge of #67131 - Centril:item-merge, r=petrochenkov
2019-12-10T13:46:30.1655487Z CI_JOB_NAME=i686-mingw-2
2019-12-10T13:46:30.1655571Z COBERTURA_HOME=C:\cobertura-2.1.1
2019-12-10T13:46:30.1655649Z COMMONPROGRAMFILES=C:\Program Files\Common Files
2019-12-10T13:46:30.1655746Z COMMON_TESTRESULTSDIRECTORY=D:\a\1\TestResults
---
2019-12-10T13:46:30.1661019Z MAVEN_OPTS=-Xms256m
2019-12-10T13:46:30.1661105Z MSDEPLOY_HTTP_USER_AGENT=VSTS_d439fc94-e01f-4249-b63e-d8392bc0247c_build_10_0
2019-12-10T13:46:30.1661212Z MSMPI_BIN=C:\Program Files\Microsoft MPI\Bin\
2019-12-10T13:46:30.1661298Z MSYSTEM=MINGW64
2019-12-10T13:46:30.1661371Z Merge `TraitItem` & `ImplItem into `AssocItem`
2019-12-10T13:46:30.1661577Z NPM_CONFIG_CACHE=C:\npm\cache
2019-12-10T13:46:30.1661684Z NPM_CONFIG_PREFIX=C:\npm\prefix
2019-12-10T13:46:30.1661786Z NUMBER_OF_PROCESSORS=2
2019-12-10T13:46:30.1661868Z OS=Windows_NT
---
2019-12-10T16:30:46.4103675Z test [ui] ui\parser\tag-variant-disr-non-nullary.rs ... ok
2019-12-10T16:30:46.5912271Z test [ui] ui\parser\trailing-carriage-return-in-string.rs ... ok
2019-12-10T16:30:47.0686641Z test [ui] ui\parser\trailing-plus-in-bounds.rs ... ok
2019-12-10T16:30:47.4305444Z test [ui] ui\parser\trait-bounds-not-on-impl.rs ... ok
2019-12-10T16:30:47.6316456Z test [ui] ui\parser\trait-item-with-defaultness-fail-semantic.rs ... ok
2019-12-10T16:30:47.8026349Z test [ui] ui\parser\trait-item-with-defaultness-pass.rs ... ok
2019-12-10T16:30:48.1936962Z test [ui] ui\parser\trait-object-lifetime-parens.rs ... ok
2019-12-10T16:30:48.3829081Z test [ui] ui\parser\trait-object-polytrait-priority.rs ... ok
2019-12-10T16:30:48.5926516Z test [ui] ui\parser\trait-object-trait-parens.rs ... ok
2019-12-10T16:30:49.0429178Z test [ui] ui\parser\trait-plusequal-splitting.rs ... ok
---
2019-12-10T16:49:11.1778032Z ---- [ui] ui\backtrace-debuginfo.rs stdout ----
2019-12-10T16:49:11.1778084Z 
2019-12-10T16:49:11.1778266Z error: test run failed!
2019-12-10T16:49:11.1778339Z status: exit code: 101
2019-12-10T16:49:11.1779746Z command: PATH="D:\a\1\s\build\i686-pc-windows-gnu\stage2\lib\rustlib\i686-pc-windows-gnu\lib;D:\a\1\s\build\i686-pc-windows-gnu\stage0-bootstrap-tools\i686-pc-windows-gnu\release\deps;D:\a\1\s\build\i686-pc-windows-gnu\stage0\bin;D:\a\1\s\ninja;D:\a\1\s\mingw32\bin;C:\Python27amd64;D:\a\msys2\usr\bin;C:\Program Files (x86)\Inno Setup 5;D:\a\1\s\sccache;C:\agents\2.160.1\externals\git\cmd;C:\hostedtoolcache\windows\Python\3.6.8\x64;C:\hostedtoolcache\windows\Python\3.6.8\x64\Scripts;C:\Program Files\Mercurial;C:\ProgramData\kind;C:\vcpkg;C:\cf-cli;C:\Program Files (x86)\NSIS;C:\Program Files\Mercurial;C:\Program Files\Boost\1.69.0;C:\Program Files\dotnet;C:\mysql-5.7.21-winx64\bin;C:\Program Files\Java\zulu-8-azure-jdk_8.40.0.25-8.0.222-win_x64\bin;C:\npm\prefix;C:\Rust\.cargo\bin;C:\hostedtoolcache\windows\Ruby\2.5.5\x64\bin;C:\Go1.12.7\bin;C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\hostedtoolcache\windows\Python\3.6.8\x64\Scripts;C:\hostedtoolcache\windows\Python\3.6.8\x64;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Microsoft MPI\Bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\ProgramData\Chocolatey\bin;C:\Program Files\Docker;C:\Program Files\PowerShell\6;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\tools\php;C:\Program Files (x86)\Subversion\bin;C:\Program Files\nodejs;C:\ProgramData\chocolatey\lib\maven\apache-maven-3.6.2\bin;C:\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\OpenSSL\bin;C:\Users\VssAdministrator\.dotnet\tools;C:\Program Files (x86)\Microsoft SQL Server\120" "D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\test\\ui\\backtrace-debuginfo\\a.exe"
2019-12-10T16:49:11.1781138Z ------------------------------------------
2019-12-10T16:49:11.1781242Z ---------------------------------------
2019-12-10T16:49:11.1781322Z trace does not match position list
2019-12-10T16:49:11.1781322Z trace does not match position list
2019-12-10T16:49:11.1781435Z still need to find ["backtrace-debuginfo.rs:189", "backtrace-debuginfo.rs:125"]
2019-12-10T16:49:11.1781587Z --- stdout
2019-12-10T16:49:11.1781653Z backtrace-debuginfo-aux.rs:6
2019-12-10T16:49:11.1781744Z backtrace-debuginfo.rs:88
2019-12-10T16:49:11.1781816Z backtrace-debuginfo.rs:125
2019-12-10T16:49:11.1781816Z backtrace-debuginfo.rs:125
2019-12-10T16:49:11.1781902Z backtrace-debuginfo.rs:189
2019-12-10T16:49:11.1781948Z 
2019-12-10T16:49:11.1782023Z --- stderr
2019-12-10T16:49:11.1782085Z test case 2
2019-12-10T16:49:11.1782195Z thread 'main' panicked at 'explicit panic', D:\a\1\s\src/test\ui\backtrace-debuginfo.rs:89:9
2019-12-10T16:49:11.1782624Z stack backtrace:
2019-12-10T16:49:11.1782730Z    0: 0x64655d2c - _set_invalid_parameter_handler
2019-12-10T16:49:11.1782835Z    1: 0x6461adb5 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1782923Z    2: 0x6462b4cf - _set_invalid_parameter_handler
2019-12-10T16:49:11.1783159Z    3: 0x6462b1d8 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1783248Z    4: 0x6462bbee - _set_invalid_parameter_handler
2019-12-10T16:49:11.1783367Z    5:   0x41a230 - std::panicking::begin_panic::hdfc91a6bf0a55891
2019-12-10T16:49:11.1783466Z                        at D:\a\1\s\src\libstd/panicking.rs:404
2019-12-10T16:49:11.1783790Z    6:   0x409a5f - backtrace_debuginfo::inner::{{closure}}::he203707f23085cd6
2019-12-10T16:49:11.1784101Z                        at D:\a\1\s\src/test\ui/backtrace-debuginfo.rs:89
2019-12-10T16:49:11.1784306Z    7:   0x40996b - backtrace_debuginfo::aux::callback::h7593cc62965c93e6
2019-12-10T16:49:11.1784514Z                        at D:\a\1\s\src/test\ui/backtrace-debuginfo-aux.rs:6
2019-12-10T16:49:11.1784718Z    8:   0x4123cb - backtrace_debuginfo::inner::hba9feb2184e80f2b
2019-12-10T16:49:11.1784905Z                        at D:\a\1\s\src/test\ui/backtrace-debuginfo.rs:88
2019-12-10T16:49:11.1785110Z    9:   0xa0c4c8 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1785288Z   10:   0x40d21c - core::str::<impl str>::parse::h87ccddfdea055ac7
2019-12-10T16:49:11.1785571Z                        at D:\a\1\s\src\libcore\str/mod.rs:3970
2019-12-10T16:49:11.1785904Z ---------------------------------------
2019-12-10T16:49:11.1786088Z trace does not match position list
2019-12-10T16:49:11.1786088Z trace does not match position list
2019-12-10T16:49:11.1787314Z still need to find ["backtrace-debuginfo.rs:189", "backtrace-debuginfo.rs:126"]
2019-12-10T16:49:11.1790298Z --- stdout
2019-12-10T16:49:11.1790385Z backtrace-debuginfo.rs:109
2019-12-10T16:49:11.1790711Z backtrace-debuginfo.rs:126
2019-12-10T16:49:11.1790786Z backtrace-debuginfo.rs:189
2019-12-10T16:49:11.1790786Z backtrace-debuginfo.rs:189
2019-12-10T16:49:11.1790831Z 
2019-12-10T16:49:11.1790908Z --- stderr
2019-12-10T16:49:11.1790970Z test case 6
2019-12-10T16:49:11.1791082Z thread 'main' panicked at 'explicit panic', D:\a\1\s\src/test\ui\backtrace-debuginfo.rs:107:9
2019-12-10T16:49:11.1791207Z stack backtrace:
2019-12-10T16:49:11.1791289Z    0: 0x64655d2c - _set_invalid_parameter_handler
2019-12-10T16:49:11.1791396Z    1: 0x6461adb5 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1791491Z    2: 0x6462b4cf - _set_invalid_parameter_handler
2019-12-10T16:49:11.1791596Z    3: 0x6462b1d8 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1792172Z    4: 0x6462bbee - _set_invalid_parameter_handler
2019-12-10T16:49:11.1792285Z    5:   0x41a230 - std::panicking::begin_panic::hdfc91a6bf0a55891
2019-12-10T16:49:11.1792401Z                        at D:\a\1\s\src\libstd/panicking.rs:404
2019-12-10T16:49:11.1792509Z    6:   0x412a26 - backtrace_debuginfo::inner_inlined::inner_further_inlined::hc6cb011b12fdc07c
2019-12-10T16:49:11.1792638Z                        at D:\a\1\s\src/test\ui/backtrace-debuginfo.rs:107
2019-12-10T16:49:11.1792739Z    7:   0x4126cc - backtrace_debuginfo::inner_inlined::h77ab595dd670898f
2019-12-10T16:49:11.1792858Z                        at D:\a\1\s\src/test\ui/backtrace-debuginfo.rs:109
2019-12-10T16:49:11.1792978Z    8:   0x9ec4c8 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1793073Z    9:   0x40d21c - core::str::<impl str>::parse::h87ccddfdea055ac7
2019-12-10T16:49:11.1793195Z                        at D:\a\1\s\src\libcore\str/mod.rs:3970
2019-12-10T16:49:11.1793328Z ---------------------------------------
2019-12-10T16:49:11.1793405Z trace does not match position list
2019-12-10T16:49:11.1793405Z trace does not match position list
2019-12-10T16:49:11.1793518Z still need to find ["backtrace-debuginfo.rs:189", "backtrace-debuginfo.rs:126"]
2019-12-10T16:49:11.1793654Z --- stdout
2019-12-10T16:49:11.1793719Z backtrace-debuginfo-aux.rs:6
2019-12-10T16:49:11.1793810Z backtrace-debuginfo.rs:111
2019-12-10T16:49:11.1793884Z backtrace-debuginfo.rs:126
2019-12-10T16:49:11.1793884Z backtrace-debuginfo.rs:126
2019-12-10T16:49:11.1793972Z backtrace-debuginfo.rs:189
2019-12-10T16:49:11.1794017Z 
2019-12-10T16:49:11.1794092Z --- stderr
2019-12-10T16:49:11.1794155Z test case 7
2019-12-10T16:49:11.1794295Z thread 'main' panicked at 'explicit panic', D:\a\1\s\src/test\ui\backtrace-debuginfo.rs:112:9
2019-12-10T16:49:11.1794527Z stack backtrace:
2019-12-10T16:49:11.1794624Z    0: 0x64655d2c - _set_invalid_parameter_handler
2019-12-10T16:49:11.1794721Z    1: 0x6461adb5 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1794825Z    2: 0x6462b4cf - _set_invalid_parameter_handler
2019-12-10T16:49:11.1794912Z    3: 0x6462b1d8 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1795016Z    4: 0x6462bbee - _set_invalid_parameter_handler
2019-12-10T16:49:11.1795127Z    5:   0x41a230 - std::panicking::begin_panic::hdfc91a6bf0a55891
2019-12-10T16:49:11.1795227Z                        at D:\a\1\s\src\libstd/panicking.rs:404
2019-12-10T16:49:11.1795343Z    6:   0x409b5f - backtrace_debuginfo::inner_inlined::{{closure}}::hfb3950c4d50c2864
2019-12-10T16:49:11.1795451Z                        at D:\a\1\s\src/test\ui/backtrace-debuginfo.rs:112
2019-12-10T16:49:11.1795578Z    7:   0x40990b - backtrace_debuginfo::aux::callback::h2d349a730207a6f1
2019-12-10T16:49:11.1795704Z                        at D:\a\1\s\src/test\ui/backtrace-debuginfo-aux.rs:6
2019-12-10T16:49:11.1795850Z    8:   0x4127a0 - backtrace_debuginfo::inner_inlined::h77ab595dd670898f
2019-12-10T16:49:11.1796039Z                        at D:\a\1\s\src/test\ui/backtrace-debuginfo.rs:111
2019-12-10T16:49:11.1796555Z    9:   0x81c4c8 - _set_invalid_parameter_handler
2019-12-10T16:49:11.1796676Z   10:   0x40d21c - core::str::<impl str>::parse::h87ccddfdea055ac7
2019-12-10T16:49:11.1796791Z                        at D:\a\1\s\src\libcore\str/mod.rs:3970
2019-12-10T16:49:11.1796881Z 
2019-12-10T16:49:11.1796966Z ------------------------------------------
2019-12-10T16:49:11.1797040Z stderr:
2019-12-10T16:49:11.1797128Z ------------------------------------------
2019-12-10T16:49:11.1797128Z ------------------------------------------
2019-12-10T16:49:11.1797230Z thread 'main' panicked at 'found some errors', D:\a\1\s\src/test\ui\backtrace-debuginfo.rs:179:9
2019-12-10T16:49:11.1797428Z 
2019-12-10T16:49:11.1797513Z ------------------------------------------
2019-12-10T16:49:11.1797562Z 
2019-12-10T16:49:11.1797596Z 
---
2019-12-10T16:49:11.1816050Z thread 'main' panicked at 'Some tests failed', src\tools\compiletest\src\main.rs:537:22
2019-12-10T16:49:11.1817170Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-10T16:49:11.1855494Z 
2019-12-10T16:49:11.1855810Z 
2019-12-10T16:49:11.1856570Z command did not execute successfully: "D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\stage0-tools-bin\\compiletest.exe" "--compile-lib-path" "D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\stage2\\bin" "--run-lib-path" "D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\stage2\\lib\\rustlib\\i686-pc-windows-gnu\\lib" "--rustc-path" "D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\stage2\\bin\\rustc.exe" "--src-base" "D:\\a\\1\\s\\src/test\\ui" "--build-base" "D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\test\\ui" "--stage-id" "stage2-i686-pc-windows-gnu" "--mode" "ui" "--target" "i686-pc-windows-gnu" "--host" "i686-pc-windows-gnu" "--llvm-filecheck" "D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\llvm\\build\\bin\\FileCheck.exe" "--nodejs" "C:\\Program Files\\nodejs\\node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\native\\rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=D:\\a\\1\\s\\build\\i686-pc-windows-gnu\\native\\rust-test-helpers" "--docck-python" "C:\\Python27amd64\\python2.7" "--lldb-python" "C:\\Python27amd64\\python2.7" "--gdb" "D:\\a\\1\\s\\mingw32\\bin\\gdb" "--llvm-version" "9.0.0-rust-1.41.0-dev\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-12-10T16:49:11.1857446Z 
2019-12-10T16:49:11.1857503Z 
2019-12-10T16:49:11.2874640Z failed to run: D:\a\1\s\build\bootstrap\debug\bootstrap test src/test/ui src/test/compile-fail
2019-12-10T16:49:11.2874914Z Build completed unsuccessfully in 2:52:54
2019-12-10T16:49:11.2874914Z Build completed unsuccessfully in 2:52:54
2019-12-10T16:49:11.3683706Z make: *** [Makefile:91: ci-mingw-subset-2] Error 1
2019-12-10T16:49:11.4306978Z   local time: Tue Dec 10 16:49:11 CUT 2019
2019-12-10T16:49:11.8765053Z   network time: Tue, 10 Dec 2019 16:49:11 GMT
2019-12-10T16:49:11.8786019Z == end clock drift check ==
2019-12-10T16:49:11.9646984Z 
2019-12-10T16:49:11.9646984Z 
2019-12-10T16:49:12.2560072Z ##[error]Bash exited with code '2'.
2019-12-10T16:49:12.3072230Z ##[section]Starting: Checkout
2019-12-10T16:49:12.4035390Z ==============================================================================
2019-12-10T16:49:12.4035526Z Task         : Get sources
2019-12-10T16:49:12.4035618Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 Dec 10, 2019

@Centril

I'm gonna interpret the radio silence here + general feeling about semantic vs. syntactic errors expressed in the past as "I have nothing new to add atop the existing consensus in #65041 (comment)". :)

in my case, I just hadn't gotten to the notification -- but I am indeed fine with the "language implications" here.

I didn't look too closely at the PR itself, though from a quick look it seemed good.

@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Dec 11, 2019

Could this PR allow the following (assuming delegate is some proc macro)?

@eddyb Indeed, that would be allowed. :) Go forth and implement!

@Centril Centril added this to the 1.41 milestone Dec 11, 2019
@Centril Centril force-pushed the Centril:item-merge branch from bf521fb to 9cc2acd Dec 11, 2019
@@ -335,8 +335,8 @@ pub fn nonterminal_to_string(nt: &Nonterminal) -> String {
token::NtLifetime(e) => e.to_string(),
token::NtLiteral(ref e) => expr_to_string(e),
token::NtTT(ref tree) => tt_to_string(tree.clone()),
token::NtImplItem(ref e) => impl_item_to_string(e),
token::NtTraitItem(ref e) => trait_item_to_string(e),
// FIXME(Centril): merge these variants.

This comment has been minimized.

Copy link
@Centril

Centril Dec 11, 2019

Author Member

@petrochenkov Btw, if you have some feedback on how to achieve this for a follow-up that would be great. :)

@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Dec 11, 2019

The job i686-mingw-2 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.

Might be spurious? I have no idea why this is happening at the moment so let's try again and see if it was.

@bors r=petrochenkov rollup=never

@Centril Centril force-pushed the Centril:item-merge branch from 9cc2acd to 054458b Dec 12, 2019
@Centril Centril removed the S-blocked label Dec 19, 2019
@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Dec 19, 2019

@bors r=petrochenkov

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 19, 2019

📌 Commit 054458b has been approved by petrochenkov

@Centril Centril modified the milestones: 1.41, 1.42 Dec 19, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 20, 2019
Merge `TraitItem` & `ImplItem into `AssocItem`

In this PR we:

- Merge `{Trait,Impl}Item{Kind?}` into `AssocItem{Kind?}` as discussed in rust-lang#65041 (comment).

   - This is done by using the cover grammar of both forms.

   - In particular, it requires that we syntactically allow (under `#[cfg(FALSE)]`):

      - `default`ness on `trait` items,

      - `impl` items without a body / definition (`const`, `type`, and `fn`),

      - and associated `type`s in `impl`s with bounds, e.g., `type Foo: Ord;`.

   - The syntactic restrictions are replaced by semantic ones in `ast_validation`.

- Move syntactic restrictions around C-variadic parameters from the parser into `ast_validation`:

    - `fn`s in all contexts now syntactically allow `...`,

    - `...` can occur anywhere in the list syntactically (`fn foo(..., x: usize) {}`),

    - and `...` can be the sole parameter (`fn foo(...) {}`.

r? @petrochenkov
@Centril

This comment has been minimized.

Copy link
Member Author

Centril commented Dec 20, 2019

@bors rollup=maybe

bors added a commit that referenced this pull request Dec 20, 2019
Rollup of 5 pull requests

Successful merges:

 - #64588 (Add a raw "address of" operator)
 - #67031 (Update tokio crates to latest versions)
 - #67131 (Merge `TraitItem` & `ImplItem into `AssocItem`)
 - #67354 (Fix pointing at arg when cause is outside of call)
 - #67363 (Fix handling of wasm import modules and names)

Failed merges:

r? @ghost
@bors bors merged commit 054458b into rust-lang:master Dec 20, 2019
4 checks passed
4 checks passed
pr #20191212.31 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-7) Linux x86_64-gnu-llvm-7 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
@Centril Centril deleted the Centril:item-merge branch Dec 20, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 21, 2019
 Refactor type & bounds parsing thoroughly

PR is based on rust-lang#67131 with first one from this PR being ` extract parse_ty_tuple_or_parens`.

Also fixes rust-lang#67146.

r? @estebank
Centril added a commit to Centril/rust that referenced this pull request Dec 22, 2019
 Refactor type & bounds parsing thoroughly

PR is based on rust-lang#67131 with first one from this PR being ` extract parse_ty_tuple_or_parens`.

Also fixes rust-lang#67146.

r? @estebank
Centril added a commit to Centril/rust that referenced this pull request Dec 22, 2019
 Refactor type & bounds parsing thoroughly

PR is based on rust-lang#67131 with first one from this PR being ` extract parse_ty_tuple_or_parens`.

Also fixes rust-lang#67146.

r? @estebank
calebcartwright added a commit to calebcartwright/rustfmt that referenced this pull request Jan 16, 2020
TraitItem/ImplItem were combined to `AssocItem`, along with their
respecitve `*Kind`'s, the `Method` variant was also renamed to `Fn` in
the new `AssocItemKind`

rust-lang/rust#67131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.