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

use TokenStream rather than &[TokenTree] for built-in macros #64041

Merged
merged 2 commits into from
Sep 5, 2019

Conversation

matklad
Copy link
Member

@matklad matklad commented Aug 31, 2019

That way, we don't loose the jointness info

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 31, 2019
@matklad
Copy link
Member Author

matklad commented Aug 31, 2019

r? @petrochenkov

is this a good idea in the first place? If it's good, I'll go and fix all other macros

@matklad
Copy link
Member Author

matklad commented Aug 31, 2019

I think we'll need something like this for #63689.

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (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-08-31T17:22:45.9848478Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-31T17:22:46.0039478Z ##[command]git config gc.auto 0
2019-08-31T17:22:46.0128477Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-31T17:22:46.0175651Z ##[command]git config --get-all http.proxy
2019-08-31T17:22:46.0321791Z ##[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/64041/merge:refs/remotes/pull/64041/merge
---
2019-08-31T17:31:31.8538027Z 
2019-08-31T17:31:31.8554092Z error: constant item is never used: `OPTIONS`
2019-08-31T17:31:31.8554864Z   --> src/libsyntax_ext/asm.rs:42:1
2019-08-31T17:31:31.8555407Z    |
2019-08-31T17:31:31.8556070Z 42 | const OPTIONS: &[Symbol] = &[sym::volatile, sym::alignstack, sym::intel];
2019-08-31T17:31:31.8557367Z 
2019-08-31T17:31:31.8557367Z 
2019-08-31T17:31:31.8624580Z error: function is never used: `expand_asm`
2019-08-31T17:31:31.8625662Z   --> src/libsyntax_ext/asm.rs:44:1
2019-08-31T17:31:31.8626241Z    |
2019-08-31T17:31:31.8626842Z 44 | / pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.8627761Z 45 | |                        sp: Span,
2019-08-31T17:31:31.8628330Z 46 | |                        tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.8629406Z 47 | |                        -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.8630602Z 68 | |     }))
2019-08-31T17:31:31.8631195Z 69 | | }
2019-08-31T17:31:31.8631586Z    | |_^
2019-08-31T17:31:31.8631730Z 
2019-08-31T17:31:31.8631730Z 
2019-08-31T17:31:31.8709311Z error: function is never used: `parse_inline_asm`
2019-08-31T17:31:31.8711936Z    --> src/libsyntax_ext/asm.rs:71:1
2019-08-31T17:31:31.8712589Z     |
2019-08-31T17:31:31.8713128Z 71  | / fn parse_inline_asm<'a>(
2019-08-31T17:31:31.8714027Z 72  | |     cx: &mut ExtCtxt<'a>,
2019-08-31T17:31:31.8714558Z 73  | |     sp: Span,
2019-08-31T17:31:31.8715026Z 74  | |     tts: &[tokenstream::TokenTree],
2019-08-31T17:31:31.8715922Z 280 | |     }))
2019-08-31T17:31:31.8716355Z 281 | | }
2019-08-31T17:31:31.8716771Z     | |_^
2019-08-31T17:31:31.8717083Z 
2019-08-31T17:31:31.8717083Z 
2019-08-31T17:31:31.8717443Z error: function is never used: `expand_cfg`
2019-08-31T17:31:31.8717847Z   --> src/libsyntax_ext/cfg.rs:14:1
2019-08-31T17:31:31.8718205Z    |
2019-08-31T17:31:31.8718668Z 14 | / pub fn expand_cfg(
2019-08-31T17:31:31.8719099Z 15 | |     cx: &mut ExtCtxt<'_>,
2019-08-31T17:31:31.8719781Z 16 | |     sp: Span,
2019-08-31T17:31:31.8720250Z 17 | |     tts: &[tokenstream::TokenTree],
2019-08-31T17:31:31.8721047Z 30 | |     }
2019-08-31T17:31:31.8721451Z 31 | | }
2019-08-31T17:31:31.8721932Z    | |_^
2019-08-31T17:31:31.8722134Z 
2019-08-31T17:31:31.8722134Z 
2019-08-31T17:31:31.8722523Z error: function is never used: `parse_cfg`
2019-08-31T17:31:31.8722906Z   --> src/libsyntax_ext/cfg.rs:33:1
2019-08-31T17:31:31.8723269Z    |
2019-08-31T17:31:31.8724114Z 33 | / fn parse_cfg<'a>(
2019-08-31T17:31:31.8724605Z 34 | |     cx: &mut ExtCtxt<'a>,
2019-08-31T17:31:31.8725048Z 35 | |     sp: Span,
2019-08-31T17:31:31.8725542Z 36 | |     tts: &[tokenstream::TokenTree],
2019-08-31T17:31:31.8726370Z 54 | |     Ok(cfg)
2019-08-31T17:31:31.8726823Z 55 | | }
2019-08-31T17:31:31.8727361Z    | |_^
2019-08-31T17:31:31.8727540Z 
2019-08-31T17:31:31.8727540Z 
2019-08-31T17:31:31.8727909Z error: function is never used: `expand_compile_error`
2019-08-31T17:31:31.8728296Z   --> src/libsyntax_ext/compile_error.rs:7:1
2019-08-31T17:31:31.8728661Z    |
2019-08-31T17:31:31.8729122Z 7  | / pub fn expand_compile_error<'cx>(cx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.8729570Z 8  | |                               sp: Span,
2019-08-31T17:31:31.8730252Z 9  | |                               tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.8730755Z 10 | |                               -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.8731161Z ...  |
2019-08-31T17:31:31.8731624Z 18 | |     DummyResult::any(sp)
2019-08-31T17:31:31.8732572Z    | |_^
2019-08-31T17:31:31.8732733Z 
2019-08-31T17:31:31.8733108Z error: function is never used: `expand_syntax_ext`
2019-08-31T17:31:31.8733888Z   --> src/libsyntax_ext/concat.rs:8:1
2019-08-31T17:31:31.8733888Z   --> src/libsyntax_ext/concat.rs:8:1
2019-08-31T17:31:31.8734342Z    |
2019-08-31T17:31:31.8734800Z 8  | / pub fn expand_syntax_ext(
2019-08-31T17:31:31.8735283Z 9  | |     cx: &mut base::ExtCtxt<'_>,
2019-08-31T17:31:31.8735933Z 10 | |     sp: syntax_pos::Span,
2019-08-31T17:31:31.8736431Z 11 | |     tts: &[tokenstream::TokenTree],
2019-08-31T17:31:31.8736824Z ...  |
2019-08-31T17:31:31.8737455Z 63 | |     base::MacEager::expr(cx.expr_str(sp, Symbol::intern(&accumulator)))
2019-08-31T17:31:31.8738415Z    | |_^
2019-08-31T17:31:31.8738593Z 
2019-08-31T17:31:31.8871138Z error: function is never used: `expand_syntax_ext`
2019-08-31T17:31:31.8872809Z   --> src/libsyntax_ext/concat_idents.rs:11:1
2019-08-31T17:31:31.8872809Z   --> src/libsyntax_ext/concat_idents.rs:11:1
2019-08-31T17:31:31.8874699Z    |
2019-08-31T17:31:31.8876539Z 11 | / pub fn expand_syntax_ext<'cx>(cx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.8876910Z 12 | |                               sp: Span,
2019-08-31T17:31:31.8879912Z 13 | |                               tts: &[TokenTree])
2019-08-31T17:31:31.8880539Z 14 | |                               -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.8880984Z ...  |
2019-08-31T17:31:31.8881458Z 65 | |     Box::new(ConcatIdentsResult { ident })
2019-08-31T17:31:31.8882606Z    | |_^
2019-08-31T17:31:31.8882766Z 
2019-08-31T17:31:31.8882766Z 
2019-08-31T17:31:31.8883162Z error: function is never used: `expand_option_env`
2019-08-31T17:31:31.8883993Z   --> src/libsyntax_ext/env.rs:14:1
2019-08-31T17:31:31.8884427Z    |
2019-08-31T17:31:31.8884956Z 14 | / pub fn expand_option_env<'cx>(cx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.8885464Z 15 | |                               sp: Span,
2019-08-31T17:31:31.8885979Z 16 | |                               tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.8886484Z 17 | |                               -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.8887069Z ...  |
2019-08-31T17:31:31.8887513Z 43 | |     MacEager::expr(e)
2019-08-31T17:31:31.8888364Z    | |_^
2019-08-31T17:31:31.8888515Z 
2019-08-31T17:31:31.8888515Z 
2019-08-31T17:31:31.8888885Z error: function is never used: `expand_env`
2019-08-31T17:31:31.8889303Z   --> src/libsyntax_ext/env.rs:46:1
2019-08-31T17:31:31.8889956Z    |
2019-08-31T17:31:31.8890428Z 46 | / pub fn expand_env<'cx>(cx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.8890888Z 47 | |                        sp: Span,
2019-08-31T17:31:31.8891359Z 48 | |                        tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.8891995Z 49 | |                        -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.8893326Z ...  |
2019-08-31T17:31:31.8894276Z 85 | |     MacEager::expr(e)
2019-08-31T17:31:31.8895169Z    | |_^
2019-08-31T17:31:31.8895355Z 
2019-08-31T17:31:31.8895765Z error: variant is never constructed: `Placeholder`
2019-08-31T17:31:31.8896182Z   --> src/libsyntax_ext/format.rs:23:5
2019-08-31T17:31:31.8896182Z   --> src/libsyntax_ext/format.rs:23:5
2019-08-31T17:31:31.8896559Z    |
2019-08-31T17:31:31.8896983Z 23 |     Placeholder(String),
2019-08-31T17:31:31.8897767Z 
2019-08-31T17:31:31.8898158Z error: variant is never constructed: `Count`
2019-08-31T17:31:31.8898560Z   --> src/libsyntax_ext/format.rs:24:5
2019-08-31T17:31:31.8898933Z    |
2019-08-31T17:31:31.8898933Z    |
2019-08-31T17:31:31.8899330Z 24 |     Count,
2019-08-31T17:31:31.8900178Z    |     ^^^^^
2019-08-31T17:31:31.8900362Z 
2019-08-31T17:31:31.8900752Z error: enum is never used: `Position`
2019-08-31T17:31:31.8901139Z   --> src/libsyntax_ext/format.rs:27:1
2019-08-31T17:31:31.8901492Z    |
2019-08-31T17:31:31.8901876Z 27 | enum Position {
2019-08-31T17:31:31.8902465Z 
2019-08-31T17:31:31.8902822Z error: struct is never constructed: `Context`
2019-08-31T17:31:31.8903211Z   --> src/libsyntax_ext/format.rs:32:1
2019-08-31T17:31:31.8903965Z    |
2019-08-31T17:31:31.8903965Z    |
2019-08-31T17:31:31.8904442Z 32 | struct Context<'a, 'b> {
2019-08-31T17:31:31.8915925Z    | ^^^^^^^^^^^^^^^^^^^^^^
2019-08-31T17:31:31.8918120Z 
2019-08-31T17:31:31.8919509Z error: function is never used: `parse_args`
2019-08-31T17:31:31.8925452Z    --> src/libsyntax_ext/format.rs:126:1
2019-08-31T17:31:31.8942817Z     |
2019-08-31T17:31:31.8944026Z 126 | / fn parse_args<'a>(
2019-08-31T17:31:31.8944730Z 127 | |     ecx: &mut ExtCtxt<'a>,
2019-08-31T17:31:31.8945207Z 128 | |     sp: Span,
2019-08-31T17:31:31.8946690Z 129 | |     tts: &[tokenstream::TokenTree]
2019-08-31T17:31:31.8946959Z ...   |
2019-08-31T17:31:31.8947264Z 194 | |     Ok((fmtstr, args, names))
2019-08-31T17:31:31.8947813Z     | |_^
2019-08-31T17:31:31.8947851Z 
2019-08-31T17:31:31.8947851Z 
2019-08-31T17:31:31.8948228Z error: method is never used: `resolve_name_inplace`
2019-08-31T17:31:31.8948557Z    --> src/libsyntax_ext/format.rs:198:5
2019-08-31T17:31:31.8948775Z     |
2019-08-31T17:31:31.8949221Z 198 |     fn resolve_name_inplace(&self, p: &mut parse::Piece<'_>) {
2019-08-31T17:31:31.8949574Z 
2019-08-31T17:31:31.8949574Z 
2019-08-31T17:31:31.8966696Z error: method is never used: `verify_piece`
2019-08-31T17:31:31.8967159Z    --> src/libsyntax_ext/format.rs:222:5
2019-08-31T17:31:31.8967410Z     |
2019-08-31T17:31:31.8967703Z 222 |     fn verify_piece(&mut self, p: &parse::Piece<'_>) {
2019-08-31T17:31:31.8968070Z 
2019-08-31T17:31:31.8968070Z 
2019-08-31T17:31:31.8983912Z error: method is never used: `verify_count`
2019-08-31T17:31:31.8985899Z    --> src/libsyntax_ext/format.rs:245:5
2019-08-31T17:31:31.8986179Z     |
2019-08-31T17:31:31.8986498Z 245 |     fn verify_count(&mut self, c: parse::Count) {
2019-08-31T17:31:31.8986836Z 
2019-08-31T17:31:31.8986836Z 
2019-08-31T17:31:31.9002459Z error: method is never used: `describe_num_args`
2019-08-31T17:31:31.9002794Z    --> src/libsyntax_ext/format.rs:258:5
2019-08-31T17:31:31.9003058Z     |
2019-08-31T17:31:31.9003872Z 258 |     fn describe_num_args(&self) -> Cow<'_, str> {
2019-08-31T17:31:31.9004325Z 
2019-08-31T17:31:31.9004325Z 
2019-08-31T17:31:31.9024801Z error: method is never used: `report_invalid_references`
2019-08-31T17:31:31.9025162Z    --> src/libsyntax_ext/format.rs:270:5
2019-08-31T17:31:31.9025421Z     |
2019-08-31T17:31:31.9025736Z 270 |     fn report_invalid_references(&self, numbered_position_args: bool) {
2019-08-31T17:31:31.9026111Z 
2019-08-31T17:31:31.9026111Z 
2019-08-31T17:31:31.9026383Z error: method is never used: `verify_arg_type`
2019-08-31T17:31:31.9026647Z    --> src/libsyntax_ext/format.rs:403:5
2019-08-31T17:31:31.9027041Z     |
2019-08-31T17:31:31.9028178Z 403 |     fn verify_arg_type(&mut self, arg: Position, ty: ArgumentType) {
2019-08-31T17:31:31.9029115Z 
2019-08-31T17:31:31.9029115Z 
2019-08-31T17:31:31.9066087Z error: method is never used: `build_index_map`
2019-08-31T17:31:31.9066491Z    --> src/libsyntax_ext/format.rs:454:5
2019-08-31T17:31:31.9066774Z     |
2019-08-31T17:31:31.9067064Z 454 |     fn build_index_map(&mut self) {
2019-08-31T17:31:31.9067632Z 
2019-08-31T17:31:31.9067632Z 
2019-08-31T17:31:31.9067922Z error: method is never used: `rtpath`
2019-08-31T17:31:31.9068181Z    --> src/libsyntax_ext/format.rs:473:5
2019-08-31T17:31:31.9068431Z     |
2019-08-31T17:31:31.9068744Z 473 |     fn rtpath(ecx: &ExtCtxt<'_>, s: &str) -> Vec<ast::Ident> {
2019-08-31T17:31:31.9069093Z 
2019-08-31T17:31:31.9069359Z error: method is never used: `build_count`
2019-08-31T17:31:31.9069732Z    --> src/libsyntax_ext/format.rs:477:5
2019-08-31T17:31:31.9069982Z     |
2019-08-31T17:31:31.9069982Z     |
2019-08-31T17:31:31.9070330Z 477 |     fn build_count(&self, c: parse::Count) -> P<ast::Expr> {
2019-08-31T17:31:31.9070706Z 
2019-08-31T17:31:31.9071000Z error: method is never used: `build_literal_string`
2019-08-31T17:31:31.9071285Z    --> src/libsyntax_ext/format.rs:504:5
2019-08-31T17:31:31.9071518Z     |
2019-08-31T17:31:31.9071518Z     |
2019-08-31T17:31:31.9071851Z 504 |     fn build_literal_string(&mut self) -> P<ast::Expr> {
2019-08-31T17:31:31.9072218Z 
2019-08-31T17:31:31.9072218Z 
2019-08-31T17:31:31.9191173Z error: method is never used: `build_piece`
2019-08-31T17:31:31.9191735Z    --> src/libsyntax_ext/format.rs:513:5
2019-08-31T17:31:31.9192350Z 513 | /     fn build_piece(
2019-08-31T17:31:31.9192695Z 514 | |         &mut self,
2019-08-31T17:31:31.9192695Z 514 | |         &mut self,
2019-08-31T17:31:31.9193050Z 515 | |         piece: &parse::Piece<'a>,
2019-08-31T17:31:31.9193756Z 516 | |         arg_index_consumed: &mut Vec<usize>,
2019-08-31T17:31:31.9194382Z 634 | |         }
2019-08-31T17:31:31.9194670Z 635 | |     }
2019-08-31T17:31:31.9194918Z     | |_____^
2019-08-31T17:31:31.9194972Z 
2019-08-31T17:31:31.9194972Z 
2019-08-31T17:31:31.9195473Z error: method is never used: `into_expr`
2019-08-31T17:31:31.9195755Z    --> src/libsyntax_ext/format.rs:639:5
2019-08-31T17:31:31.9196009Z     |
2019-08-31T17:31:31.9196318Z 639 |     fn into_expr(self) -> P<ast::Expr> {
2019-08-31T17:31:31.9196663Z 
2019-08-31T17:31:31.9196946Z error: method is never used: `format_arg`
2019-08-31T17:31:31.9197327Z    --> src/libsyntax_ext/format.rs:740:5
2019-08-31T17:31:31.9197593Z     |
2019-08-31T17:31:31.9197593Z     |
2019-08-31T17:31:31.9197928Z 740 | /     fn format_arg(
2019-08-31T17:31:31.9198404Z 741 | |         ecx: &ExtCtxt<'_>,
2019-08-31T17:31:31.9198951Z 742 | |         macsp: Span,
2019-08-31T17:31:31.9199274Z 743 | |         mut sp: Span,
2019-08-31T17:31:31.9199609Z ...   |
2019-08-31T17:31:31.9199987Z 790 | |         ecx.expr_call_global(macsp, path, vec![arg, ecx.expr_path(format_fn)])
2019-08-31T17:31:31.9200548Z     | |_____^
2019-08-31T17:31:31.9200601Z 
2019-08-31T17:31:31.9200861Z error: function is never used: `expand_format_args_impl`
2019-08-31T17:31:31.9201132Z    --> src/libsyntax_ext/format.rs:794:1
2019-08-31T17:31:31.9201132Z    --> src/libsyntax_ext/format.rs:794:1
2019-08-31T17:31:31.9201526Z     |
2019-08-31T17:31:31.9201881Z 794 | / fn expand_format_args_impl<'cx>(
2019-08-31T17:31:31.9202340Z 795 | |     ecx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.9202992Z 796 | |     mut sp: Span,
2019-08-31T17:31:31.9203314Z 797 | |     tts: &[tokenstream::TokenTree],
2019-08-31T17:31:31.9204237Z 809 | |     }
2019-08-31T17:31:31.9204528Z 810 | | }
2019-08-31T17:31:31.9204768Z     | |_^
2019-08-31T17:31:31.9204818Z 
2019-08-31T17:31:31.9204818Z 
2019-08-31T17:31:31.9205073Z error: function is never used: `expand_format_args`
2019-08-31T17:31:31.9205330Z    --> src/libsyntax_ext/format.rs:812:1
2019-08-31T17:31:31.9205561Z     |
2019-08-31T17:31:31.9205872Z 812 | / pub fn expand_format_args<'cx>(
2019-08-31T17:31:31.9206184Z 813 | |     ecx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.9206495Z 814 | |     sp: Span,
2019-08-31T17:31:31.9207119Z 815 | |     tts: &[tokenstream::TokenTree],
2019-08-31T17:31:31.9207415Z 816 | | ) -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.9207736Z 817 | |     expand_format_args_impl(ecx, sp, tts, false)
2019-08-31T17:31:31.9208307Z     | |_^
2019-08-31T17:31:31.9208346Z 
2019-08-31T17:31:31.9208346Z 
2019-08-31T17:31:31.9208609Z error: function is never used: `expand_format_args_nl`
2019-08-31T17:31:31.9208848Z    --> src/libsyntax_ext/format.rs:820:1
2019-08-31T17:31:31.9209067Z     |
2019-08-31T17:31:31.9209363Z 820 | / pub fn expand_format_args_nl<'cx>(
2019-08-31T17:31:31.9209653Z 821 | |     ecx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.9209943Z 822 | |     sp: Span,
2019-08-31T17:31:31.9210233Z 823 | |     tts: &[tokenstream::TokenTree],
2019-08-31T17:31:31.9210550Z 824 | | ) -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.9210857Z 825 | |     expand_format_args_impl(ecx, sp, tts, true)
2019-08-31T17:31:31.9211375Z     | |_^
2019-08-31T17:31:31.9211406Z 
2019-08-31T17:31:31.9211406Z 
2019-08-31T17:31:31.9351442Z error: function is never used: `expand_preparsed_format_args`
2019-08-31T17:31:31.9352232Z     --> src/libsyntax_ext/format.rs:830:1
2019-08-31T17:31:31.9352858Z      |
2019-08-31T17:31:31.9354045Z 830  | / pub fn expand_preparsed_format_args(
2019-08-31T17:31:31.9354881Z 831  | |     ecx: &mut ExtCtxt<'_>,
2019-08-31T17:31:31.9355473Z 832  | |     sp: Span,
2019-08-31T17:31:31.9355933Z 833  | |     efmt: P<ast::Expr>,
2019-08-31T17:31:31.9356582Z ...    |
2019-08-31T17:31:31.9357121Z 1197 | |     cx.into_expr()
2019-08-31T17:31:31.9363005Z      | |_^
2019-08-31T17:31:31.9363228Z 
2019-08-31T17:31:31.9363228Z 
2019-08-31T17:31:31.9363962Z error: method is never used: `as_str`
2019-08-31T17:31:31.9364283Z   --> src/libsyntax_ext/format_foreign.rs:15:9
2019-08-31T17:31:31.9364810Z 15 |         pub fn as_str(&self) -> &str {
2019-08-31T17:31:31.9365092Z    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-08-31T17:31:31.9365329Z 
2019-08-31T17:31:31.9365630Z error: method is never used: `translate`
---
2019-08-31T17:31:31.9368656Z 
2019-08-31T17:31:31.9368913Z error: method is never used: `translate`
2019-08-31T17:31:31.9369210Z    --> src/libsyntax_ext/format_foreign.rs:253:9
2019-08-31T17:31:31.9369441Z     |
2019-08-31T17:31:31.9369768Z 253 |         fn translate(&self, s: &mut String) -> std::fmt::Result {
2019-08-31T17:31:31.9370155Z 
2019-08-31T17:31:31.9370415Z error: function is never used: `iter_subs`
2019-08-31T17:31:31.9370717Z    --> src/libsyntax_ext/format_foreign.rs:267:5
2019-08-31T17:31:31.9370954Z     |
2019-08-31T17:31:31.9370954Z     |
2019-08-31T17:31:31.9371280Z 267 |     pub fn iter_subs(s: &str, start_pos: usize) -> Substitutions<'_> {
2019-08-31T17:31:31.9371667Z 
2019-08-31T17:31:31.9371667Z 
2019-08-31T17:31:31.9371937Z error: struct is never constructed: `Substitutions`
2019-08-31T17:31:31.9372224Z    --> src/libsyntax_ext/format_foreign.rs:275:5
2019-08-31T17:31:31.9372766Z 275 |     pub struct Substitutions<'a> {
2019-08-31T17:31:31.9373072Z     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-08-31T17:31:31.9373119Z 
2019-08-31T17:31:31.9373119Z 
2019-08-31T17:31:31.9373378Z error: method is never used: `as_str`
2019-08-31T17:31:31.9374067Z    --> src/libsyntax_ext/format_foreign.rs:623:9
2019-08-31T17:31:31.9374596Z 623 |         pub fn as_str(&self) -> String {
2019-08-31T17:31:31.9374882Z     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-08-31T17:31:31.9374936Z 
2019-08-31T17:31:31.9375194Z error: method is never used: `translate`
---
2019-08-31T17:31:31.9376563Z 
2019-08-31T17:31:31.9377006Z error: function is never used: `iter_subs`
2019-08-31T17:31:31.9377265Z    --> src/libsyntax_ext/format_foreign.rs:657:5
2019-08-31T17:31:31.9377476Z     |
2019-08-31T17:31:31.9377871Z 657 |     pub fn iter_subs(s: &str, start_pos: usize) -> Substitutions<'_> {
2019-08-31T17:31:31.9378242Z 
2019-08-31T17:31:31.9378242Z 
2019-08-31T17:31:31.9378505Z error: struct is never constructed: `Substitutions`
2019-08-31T17:31:31.9378771Z    --> src/libsyntax_ext/format_foreign.rs:665:5
2019-08-31T17:31:31.9379267Z 665 |     pub struct Substitutions<'a> {
2019-08-31T17:31:31.9379535Z     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-08-31T17:31:31.9379572Z 
2019-08-31T17:31:31.9379572Z 
2019-08-31T17:31:31.9379832Z error: function is never used: `expand_global_asm`
2019-08-31T17:31:31.9380243Z   --> src/libsyntax_ext/global_asm.rs:22:1
2019-08-31T17:31:31.9380469Z    |
2019-08-31T17:31:31.9380804Z 22 | / pub fn expand_global_asm<'cx>(cx: &'cx mut ExtCtxt<'_>,
2019-08-31T17:31:31.9381113Z 23 | |                               sp: Span,
2019-08-31T17:31:31.9381477Z 24 | |                               tts: &[tokenstream::TokenTree]) -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.9381815Z 25 | |     match parse_global_asm(cx, sp, tts) {
2019-08-31T17:31:31.9382350Z 42 | |     }
2019-08-31T17:31:31.9382629Z 43 | | }
2019-08-31T17:31:31.9382863Z    | |_^
2019-08-31T17:31:31.9382899Z 
2019-08-31T17:31:31.9382899Z 
2019-08-31T17:31:31.9423985Z error: function is never used: `parse_global_asm`
2019-08-31T17:31:31.9424327Z   --> src/libsyntax_ext/global_asm.rs:45:1
2019-08-31T17:31:31.9424583Z    |
2019-08-31T17:31:31.9424894Z 45 | / fn parse_global_asm<'a>(
2019-08-31T17:31:31.9425197Z 46 | |     cx: &mut ExtCtxt<'a>,
2019-08-31T17:31:31.9425506Z 47 | |     sp: Span,
2019-08-31T17:31:31.9425831Z 48 | |     tts: &[tokenstream::TokenTree]
2019-08-31T17:31:31.9426081Z ...  |
2019-08-31T17:31:31.9426408Z 64 | |     Ok(Some(ast::GlobalAsm { asm }))
2019-08-31T17:31:31.9428141Z    | |_^
2019-08-31T17:31:31.9428200Z 
2019-08-31T17:31:31.9467259Z error: function is never used: `expand_syntax_ext`
2019-08-31T17:31:31.9467706Z   --> src/libsyntax_ext/log_syntax.rs:6:1
2019-08-31T17:31:31.9467706Z   --> src/libsyntax_ext/log_syntax.rs:6:1
2019-08-31T17:31:31.9467944Z    |
2019-08-31T17:31:31.9468436Z 6  | / pub fn expand_syntax_ext<'cx>(_cx: &'cx mut base::ExtCtxt<'_>,
2019-08-31T17:31:31.9468803Z 7  | |                               sp: syntax_pos::Span,
2019-08-31T17:31:31.9469341Z 8  | |                               tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9469683Z 9  | |                               -> Box<dyn base::MacResult + 'cx> {
2019-08-31T17:31:31.9470093Z ...  |
2019-08-31T17:31:31.9470471Z 13 | |     base::DummyResult::any_valid(sp)
2019-08-31T17:31:31.9470981Z    | |_^
2019-08-31T17:31:31.9471016Z 
2019-08-31T17:31:31.9471016Z 
2019-08-31T17:31:31.9552565Z error: function is never used: `expand_line`
2019-08-31T17:31:31.9553161Z   --> src/libsyntax_ext/source_util.rs:19:1
2019-08-31T17:31:31.9553954Z    |
2019-08-31T17:31:31.9554564Z 19 | / pub fn expand_line(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9555094Z 20 | |                    -> Box<dyn base::MacResult+'static> {
2019-08-31T17:31:31.9555579Z 21 | |     base::check_zero_tts(cx, sp, tts, "line!");
2019-08-31T17:31:31.9556439Z ...  |
2019-08-31T17:31:31.9556439Z ...  |
2019-08-31T17:31:31.9556946Z 26 | |     base::MacEager::expr(cx.expr_u32(topmost, loc.line as u32))
2019-08-31T17:31:31.9557920Z    | |_^
2019-08-31T17:31:31.9558088Z 
2019-08-31T17:31:31.9558088Z 
2019-08-31T17:31:31.9558456Z error: function is never used: `expand_column`
2019-08-31T17:31:31.9558705Z   --> src/libsyntax_ext/source_util.rs:30:1
2019-08-31T17:31:31.9559091Z    |
2019-08-31T17:31:31.9559573Z 30 | / pub fn expand_column(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9560071Z 31 | |                   -> Box<dyn base::MacResult+'static> {
2019-08-31T17:31:31.9560534Z 32 | |     base::check_zero_tts(cx, sp, tts, "column!");
2019-08-31T17:31:31.9561778Z ...  |
2019-08-31T17:31:31.9561778Z ...  |
2019-08-31T17:31:31.9562270Z 37 | |     base::MacEager::expr(cx.expr_u32(topmost, loc.col.to_usize() as u32 + 1))
2019-08-31T17:31:31.9563115Z    | |_^
2019-08-31T17:31:31.9563264Z 
2019-08-31T17:31:31.9564352Z error: function is never used: `expand_file`
2019-08-31T17:31:31.9564968Z   --> src/libsyntax_ext/source_util.rs:43:1
2019-08-31T17:31:31.9564968Z   --> src/libsyntax_ext/source_util.rs:43:1
2019-08-31T17:31:31.9565376Z    |
2019-08-31T17:31:31.9565900Z 43 | / pub fn expand_file(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9566413Z 44 | |                    -> Box<dyn base::MacResult+'static> {
2019-08-31T17:31:31.9567076Z 45 | |     base::check_zero_tts(cx, sp, tts, "file!");
2019-08-31T17:31:31.9567898Z ...  |
2019-08-31T17:31:31.9567898Z ...  |
2019-08-31T17:31:31.9568410Z 49 | |     base::MacEager::expr(cx.expr_str(topmost, Symbol::intern(&loc.file.name.to_string())))
2019-08-31T17:31:31.9569265Z    | |_^
2019-08-31T17:31:31.9569415Z 
2019-08-31T17:31:31.9569415Z 
2019-08-31T17:31:31.9569794Z error: function is never used: `expand_stringify`
2019-08-31T17:31:31.9570056Z   --> src/libsyntax_ext/source_util.rs:52:1
2019-08-31T17:31:31.9570418Z    |
2019-08-31T17:31:31.9570935Z 52 | / pub fn expand_stringify(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9571708Z 53 | |                         -> Box<dyn base::MacResult+'static> {
2019-08-31T17:31:31.9572215Z 54 | |     let s = pprust::tts_to_string(tts);
2019-08-31T17:31:31.9572709Z 55 | |     base::MacEager::expr(cx.expr_str(sp, Symbol::intern(&s)))
2019-08-31T17:31:31.9574063Z    | |_^
2019-08-31T17:31:31.9574247Z 
2019-08-31T17:31:31.9574247Z 
2019-08-31T17:31:31.9574614Z error: function is never used: `expand_mod`
2019-08-31T17:31:31.9574901Z   --> src/libsyntax_ext/source_util.rs:58:1
2019-08-31T17:31:31.9575279Z    |
2019-08-31T17:31:31.9575821Z 58 | / pub fn expand_mod(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9576323Z 59 | |                   -> Box<dyn base::MacResult+'static> {
2019-08-31T17:31:31.9577015Z 60 | |     base::check_zero_tts(cx, sp, tts, "module_path!");
2019-08-31T17:31:31.9577656Z 61 | |     let mod_path = &cx.current_expansion.module.mod_path;
2019-08-31T17:31:31.9578098Z ...  |
2019-08-31T17:31:31.9578642Z 64 | |     base::MacEager::expr(cx.expr_str(sp, Symbol::intern(&string)))
2019-08-31T17:31:31.9579680Z    | |_^
2019-08-31T17:31:31.9579843Z 
2019-08-31T17:31:31.9580377Z error: function is never used: `expand_include`
2019-08-31T17:31:31.9580698Z    --> src/libsyntax_ext/source_util.rs:70:1
2019-08-31T17:31:31.9580698Z    --> src/libsyntax_ext/source_util.rs:70:1
2019-08-31T17:31:31.9581112Z     |
2019-08-31T17:31:31.9581656Z 70  | / pub fn expand_include<'cx>(cx: &'cx mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9582189Z 71  | |                            -> Box<dyn base::MacResult+'cx> {
2019-08-31T17:31:31.9582718Z 72  | |     let file = match get_single_str_from_tts(cx, sp, tts, "include!") {
2019-08-31T17:31:31.9583221Z 73  | |         Some(f) => f,
2019-08-31T17:31:31.9584323Z ...   |
2019-08-31T17:31:31.9585434Z 104 | |     Box::new(ExpandResult { p })
2019-08-31T17:31:31.9621106Z     | |_^
2019-08-31T17:31:31.9621168Z 
2019-08-31T17:31:31.9621168Z 
2019-08-31T17:31:31.9621414Z error: function is never used: `expand_include_str`
2019-08-31T17:31:31.9621661Z    --> src/libsyntax_ext/source_util.rs:108:1
2019-08-31T17:31:31.9621900Z     |
2019-08-31T17:31:31.9622245Z 108 | / pub fn expand_include_str(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9622566Z 109 | |                           -> Box<dyn base::MacResult+'static> {
2019-08-31T17:31:31.9622926Z 110 | |     let file = match get_single_str_from_tts(cx, sp, tts, "include_str!") {
2019-08-31T17:31:31.9623379Z 111 | |         Some(f) => f,
2019-08-31T17:31:31.9625028Z 130 | |     }
2019-08-31T17:31:31.9625323Z 131 | | }
2019-08-31T17:31:31.9625965Z     | |_^
2019-08-31T17:31:31.9626008Z 
2019-08-31T17:31:31.9626008Z 
2019-08-31T17:31:31.9626440Z error: function is never used: `expand_include_bytes`
2019-08-31T17:31:31.9627176Z    --> src/libsyntax_ext/source_util.rs:133:1
2019-08-31T17:31:31.9627591Z     |
2019-08-31T17:31:31.9628287Z 133 | / pub fn expand_include_bytes(cx: &mut ExtCtxt<'_>, sp: Span, tts: &[tokenstream::TokenTree])
2019-08-31T17:31:31.9628816Z 134 | |                             -> Box<dyn base::MacResult+'static> {
2019-08-31T17:31:31.9629422Z 135 | |     let file = match get_single_str_from_tts(cx, sp, tts, "include_bytes!") {
2019-08-31T17:31:31.9629945Z 136 | |         Some(f) => f,
2019-08-31T17:31:31.9630782Z 148 | |     }
2019-08-31T17:31:31.9631223Z 149 | | }
2019-08-31T17:31:31.9631607Z     | |_^
2019-08-31T17:31:31.9631775Z 
2019-08-31T17:31:31.9631775Z 
2019-08-31T17:31:31.9632148Z error: function is never used: `expand_trace_macros`
2019-08-31T17:31:31.9632407Z   --> src/libsyntax_ext/trace_macros.rs:6:1
2019-08-31T17:31:31.9632797Z    |
2019-08-31T17:31:31.9633274Z 6  | / pub fn expand_trace_macros(cx: &mut ExtCtxt<'_>,
2019-08-31T17:31:31.9634159Z 7  | |                            sp: Span,
2019-08-31T17:31:31.9634707Z 8  | |                            tt: &[TokenTree])
2019-08-31T17:31:31.9635228Z 9  | |                            -> Box<dyn base::MacResult + 'static> {
2019-08-31T17:31:31.9635657Z ...  |
2019-08-31T17:31:31.9636124Z 20 | |     base::DummyResult::any_valid(sp)
2019-08-31T17:31:31.9637150Z    | |_^
2019-08-31T17:31:31.9637308Z 
2019-08-31T17:31:32.0090730Z error: aborting due to 56 previous errors
2019-08-31T17:31:32.0091051Z 
---
2019-08-31T17:32:22.5355541Z == clock drift check ==
2019-08-31T17:32:22.5375622Z   local time: Sat Aug 31 17:32:22 UTC 2019
2019-08-31T17:32:22.6860805Z   network time: Sat, 31 Aug 2019 17:32:22 GMT
2019-08-31T17:32:22.6866488Z == end clock drift check ==
2019-08-31T17:32:23.6541432Z ##[error]Bash exited with code '1'.
2019-08-31T17:32:23.6579051Z ##[section]Starting: Checkout
2019-08-31T17:32:23.6582169Z ==============================================================================
2019-08-31T17:32:23.6582222Z Task         : Get sources
2019-08-31T17:32:23.6582269Z 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)

@matklad
Copy link
Member Author

matklad commented Sep 2, 2019

I see a 👍 from @matthewjasper , so I'll move forward with this :)

@petrochenkov petrochenkov 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 Sep 2, 2019
@matklad matklad changed the title WIP: use TokenStream rather than &[TokenTree] for built-in macros use TokenStream rather than &[TokenTree] for built-in macros Sep 3, 2019
@matklad
Copy link
Member Author

matklad commented Sep 3, 2019

ready for review

@rustbot modify labels to: -S-waiting-on-author, +S-waiting-on-review

@rustbot
Copy link
Collaborator

rustbot commented Sep 3, 2019

Error: Parsing label command in comment failed: ... labels to|error: a label delta at >|: -S-waiti...

Please let @rust-lang/release know if you're having trouble with this bot.

@matklad

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Sep 3, 2019

@rustbot modify labels to -S-waiting-on-author, +S-waiting-on-review

Yeah, the : after to looks like the cause. We should just accept that.

Edit: And, pushed a commit with a fix and will try and deploy in an hour or so.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 3, 2019
src/libsyntax_ext/source_util.rs Show resolved Hide resolved
src/libsyntax/ext/base.rs Outdated Show resolved Hide resolved
@petrochenkov petrochenkov 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 Sep 3, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (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-09-03T14:48:59.1481534Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-03T14:48:59.1682396Z ##[command]git config gc.auto 0
2019-09-03T14:48:59.1781705Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-03T14:48:59.1877016Z ##[command]git config --get-all http.proxy
2019-09-03T14:48:59.2049417Z ##[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/64041/merge:refs/remotes/pull/64041/merge
---
2019-09-03T15:57:23.3632482Z .................................................................................................... 1500/8987
2019-09-03T15:57:29.5121429Z .................................................................................................... 1600/8987
2019-09-03T15:57:43.4063870Z .................................................i...............i.................................. 1700/8987
2019-09-03T15:57:52.4399049Z .................................................................................................... 1800/8987
2019-09-03T15:58:07.9585630Z ........................................iiiii....................................................... 1900/8987
2019-09-03T15:58:19.8890421Z .................................................................................................... 2100/8987
2019-09-03T15:58:22.7116968Z .................................................................................................... 2200/8987
2019-09-03T15:58:27.1509872Z .................................................................................................... 2300/8987
2019-09-03T15:58:35.4390602Z .................................................................................................... 2400/8987
---
2019-09-03T16:01:49.9027833Z ...........................i...............i........................................................ 4700/8987
2019-09-03T16:02:02.8540455Z .................................................................................................... 4800/8987
2019-09-03T16:02:09.6251326Z .................................................................................................... 4900/8987
2019-09-03T16:02:21.3555299Z .................................................................................................... 5000/8987
2019-09-03T16:02:27.5489696Z ........ii.ii....................................................................................... 5100/8987
2019-09-03T16:02:41.8338201Z .................................................................................................... 5300/8987
2019-09-03T16:02:50.7971346Z .......................................................................i............................ 5400/8987
2019-09-03T16:02:58.8578066Z .................................................................................................... 5500/8987
2019-09-03T16:03:06.0982374Z .................................................................................................... 5600/8987
2019-09-03T16:03:06.0982374Z .................................................................................................... 5600/8987
2019-09-03T16:03:17.4657138Z .................................................................ii...i..ii...........i............. 5700/8987
2019-09-03T16:03:45.0133522Z .................................................................................................... 5900/8987
2019-09-03T16:03:55.6498769Z .................................................................................................... 6000/8987
2019-09-03T16:03:55.6498769Z .................................................................................................... 6000/8987
2019-09-03T16:04:05.8713780Z ...................................................................i..ii............................ 6100/8987
2019-09-03T16:04:37.2074290Z .................................................................................................... 6300/8987
2019-09-03T16:04:39.5646042Z ......................i............................................................................. 6400/8987
2019-09-03T16:04:41.9526245Z ..............................................................................................i..... 6500/8987
2019-09-03T16:04:44.9751968Z .................................................................................................... 6600/8987
---
2019-09-03T16:09:59.1274110Z  finished in 22.791
2019-09-03T16:09:59.1478849Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T16:09:59.3765884Z 
2019-09-03T16:09:59.3766891Z running 149 tests
2019-09-03T16:10:02.9973778Z i....iii......iii..iiii....i.............................i..i..................i....i.........ii.i.i 100/149
2019-09-03T16:10:05.1421600Z ..iiii..............i.........iii.i......ii......
2019-09-03T16:10:05.1422262Z 
2019-09-03T16:10:05.1503839Z  finished in 5.995
2019-09-03T16:10:05.1622705Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T16:10:05.3487752Z 
---
2019-09-03T16:10:07.6073483Z  finished in 2.445
2019-09-03T16:10:07.6294518Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T16:10:07.7994812Z 
2019-09-03T16:10:07.7995097Z running 9 tests
2019-09-03T16:10:07.7997473Z iiiiiiiii
2019-09-03T16:10:07.7997893Z 
2019-09-03T16:10:07.7997972Z  finished in 0.170
2019-09-03T16:10:07.8196549Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T16:10:08.0170031Z 
---
2019-09-03T16:10:27.9342193Z  finished in 20.114
2019-09-03T16:10:27.9617872Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T16:10:28.1865507Z 
2019-09-03T16:10:28.1865792Z running 123 tests
2019-09-03T16:10:55.0874659Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i...ii...i.......ii. 100/123
2019-09-03T16:11:00.2415393Z i.i.i......iii.i.....ii
2019-09-03T16:11:00.2418806Z 
2019-09-03T16:11:00.2419054Z  finished in 32.280
2019-09-03T16:11:00.2431369Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T16:11:00.2432029Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-09-03T16:12:07.7185793Z failures:
2019-09-03T16:12:07.7185830Z 
2019-09-03T16:12:07.7190989Z ---- [ui] ui-fulldeps/roman-numerals-macro.rs stdout ----
2019-09-03T16:12:07.7191141Z 
2019-09-03T16:12:07.7191574Z error: auxiliary build of "/checkout/src/test/ui-fulldeps/auxiliary/roman-numerals.rs" failed to compile: 
2019-09-03T16:12:07.7191640Z status: exit code: 1
2019-09-03T16:12:07.7192515Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui-fulldeps/auxiliary/roman-numerals.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/roman-numerals-macro/auxiliary" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type" "dylib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/roman-numerals-macro/auxiliary"
2019-09-03T16:12:07.7192917Z ------------------------------------------
2019-09-03T16:12:07.7192957Z 
2019-09-03T16:12:07.7193274Z ------------------------------------------
2019-09-03T16:12:07.7193346Z stderr:
2019-09-03T16:12:07.7193346Z stderr:
2019-09-03T16:12:07.7193596Z ------------------------------------------
2019-09-03T16:12:07.7193652Z error[E0308]: mismatched types
2019-09-03T16:12:07.7193944Z   --> /checkout/src/test/ui-fulldeps/auxiliary/roman-numerals.rs:67:30
2019-09-03T16:12:07.7194003Z    |
2019-09-03T16:12:07.7194067Z LL |     reg.register_macro("rn", expand_rn);
2019-09-03T16:12:07.7194146Z    |                              ^^^^^^^^^ expected struct `syntax::tokenstream::TokenStream`, found reference
2019-09-03T16:12:07.7194202Z    |
2019-09-03T16:12:07.7194615Z    = note: expected type `for<'cx, 'r> fn(&'cx mut syntax::ext::base::ExtCtxt<'r>, syntax_pos::Span, syntax::tokenstream::TokenStream) -> std::boxed::Box<(dyn syntax::ext::base::MacResult + 'cx)>`
2019-09-03T16:12:07.7195299Z               found type `for<'r, 's, 't0> fn(&'r mut syntax::ext::base::ExtCtxt<'s>, syntax_pos::Span, &'t0 [syntax::tokenstream::TokenTree]) -> std::boxed::Box<(dyn syntax::ext::base::MacResult + 'static)> {expand_rn}`
2019-09-03T16:12:07.7195430Z error: aborting due to previous error
2019-09-03T16:12:07.7195485Z 
2019-09-03T16:12:07.7195826Z For more information about this error, try `rustc --explain E0308`.
2019-09-03T16:12:07.7195868Z 
---
2019-09-03T16:12:07.7208385Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:536:22
2019-09-03T16:12:07.7208539Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-09-03T16:12:07.7212011Z 
2019-09-03T16:12:07.7217011Z 
2019-09-03T16:12:07.7284378Z 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-fulldeps" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps" "--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 -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" "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"
2019-09-03T16:12:07.7285038Z 
2019-09-03T16:12:07.7285070Z 
2019-09-03T16:12:07.7285137Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-09-03T16:12:07.7285195Z Build completed unsuccessfully in 1:15:31
2019-09-03T16:12:07.7285195Z Build completed unsuccessfully in 1:15:31
2019-09-03T16:12:07.7290626Z == clock drift check ==
2019-09-03T16:12:07.7308519Z   local time: Tue Sep  3 16:12:07 UTC 2019
2019-09-03T16:12:07.8845142Z   network time: Tue, 03 Sep 2019 16:12:07 GMT
2019-09-03T16:12:07.8845253Z == end clock drift check ==
2019-09-03T16:12:08.4900556Z ##[error]Bash exited with code '1'.
2019-09-03T16:12:08.4947301Z ##[section]Starting: Checkout
2019-09-03T16:12:08.4950058Z ==============================================================================
2019-09-03T16:12:08.4950122Z Task         : Get sources
2019-09-03T16:12:08.4950175Z 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)

@matklad matklad force-pushed the token-stream-tt branch 2 times, most recently from 625a27c to 610451f Compare September 3, 2019 16:25
@matklad
Copy link
Member Author

matklad commented Sep 3, 2019

addressed the comments.

Note that this changes (unstable) compiler plugin API.

@rustbot modify labels: +S-waiting-on-review, -S-waiting-on-author

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

@bors r+

@bors
Copy link
Contributor

bors commented Sep 3, 2019

📌 Commit 610451f9246b82cdb8bb220219ed9d8674343124 has been approved by petrochenkov

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2019
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 3, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (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-09-03T16:31:34.1600591Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-09-03T16:31:34.1808063Z ##[command]git config gc.auto 0
2019-09-03T16:31:34.1898343Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-09-03T16:31:34.1952933Z ##[command]git config --get-all http.proxy
2019-09-03T16:31:34.2110086Z ##[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/64041/merge:refs/remotes/pull/64041/merge
---
2019-09-03T17:38:30.2561292Z .................................................................................................... 1500/8987
2019-09-03T17:38:36.4479777Z .................................................................................................... 1600/8987
2019-09-03T17:38:50.3296963Z .................................................i...............i.................................. 1700/8987
2019-09-03T17:38:59.4130256Z .................................................................................................... 1800/8987
2019-09-03T17:39:15.6694136Z ........................................iiiii....................................................... 1900/8987
2019-09-03T17:39:27.6890073Z .................................................................................................... 2100/8987
2019-09-03T17:39:30.5479487Z .................................................................................................... 2200/8987
2019-09-03T17:39:35.0678300Z .................................................................................................... 2300/8987
2019-09-03T17:39:43.4128122Z .................................................................................................... 2400/8987
---
2019-09-03T17:43:00.5865159Z ...........................i...............i........................................................ 4700/8987
2019-09-03T17:43:13.6742869Z .................................................................................................... 4800/8987
2019-09-03T17:43:20.4836500Z .................................................................................................... 4900/8987
2019-09-03T17:43:32.2986621Z .................................................................................................... 5000/8987
2019-09-03T17:43:38.6325736Z ........ii.ii....................................................................................... 5100/8987
2019-09-03T17:43:53.1660593Z .................................................................................................... 5300/8987
2019-09-03T17:44:02.5829701Z .......................................................................i............................ 5400/8987
2019-09-03T17:44:10.7318317Z .................................................................................................... 5500/8987
2019-09-03T17:44:18.0490725Z .................................................................................................... 5600/8987
2019-09-03T17:44:18.0490725Z .................................................................................................... 5600/8987
2019-09-03T17:44:29.8093452Z .................................................................ii...i..ii............i............ 5700/8987
2019-09-03T17:44:58.1210253Z .................................................................................................... 5900/8987
2019-09-03T17:45:08.7536706Z .................................................................................................... 6000/8987
2019-09-03T17:45:08.7536706Z .................................................................................................... 6000/8987
2019-09-03T17:45:19.0906669Z ...................................................................i..ii............................ 6100/8987
2019-09-03T17:45:50.8740422Z .................................................................................................... 6300/8987
2019-09-03T17:45:53.2365948Z ......................i............................................................................. 6400/8987
2019-09-03T17:45:55.6661600Z ..............................................................................................i..... 6500/8987
2019-09-03T17:45:58.6474930Z .................................................................................................... 6600/8987
---
2019-09-03T17:51:11.0383811Z  finished in 20.715
2019-09-03T17:51:11.0579303Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T17:51:11.2664931Z 
2019-09-03T17:51:11.2666055Z running 149 tests
2019-09-03T17:51:14.7543203Z i....iii......iii..iiii....i.............................i..i..................i....i.........ii.i.i 100/149
2019-09-03T17:51:16.8995991Z ..iiii..............i.........iii.i......ii......
2019-09-03T17:51:16.8997461Z 
2019-09-03T17:51:16.9003197Z  finished in 5.842
2019-09-03T17:51:16.9208840Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T17:51:17.1075035Z 
---
2019-09-03T17:51:19.4239184Z  finished in 2.502
2019-09-03T17:51:19.4456413Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T17:51:19.6208607Z 
2019-09-03T17:51:19.6209008Z running 9 tests
2019-09-03T17:51:19.6209892Z iiiiiiiii
2019-09-03T17:51:19.6210298Z 
2019-09-03T17:51:19.6210343Z  finished in 0.175
2019-09-03T17:51:19.6428528Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T17:51:19.8403026Z 
---
2019-09-03T17:51:39.5451095Z  finished in 19.902
2019-09-03T17:51:39.5685322Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T17:51:39.7669521Z 
2019-09-03T17:51:39.7669925Z running 123 tests
2019-09-03T17:52:05.2391071Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i...ii...i.......ii. 100/123
2019-09-03T17:52:10.2483472Z i.i.i......iii.i.....ii
2019-09-03T17:52:10.2485203Z 
2019-09-03T17:52:10.2486305Z  finished in 30.680
2019-09-03T17:52:10.2497735Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-09-03T17:52:10.2499881Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-09-03T17:53:18.4188275Z failures:
2019-09-03T17:53:18.4188308Z 
2019-09-03T17:53:18.4188631Z ---- [ui] ui-fulldeps/roman-numerals-macro.rs stdout ----
2019-09-03T17:53:18.4188671Z 
2019-09-03T17:53:18.4188973Z error: auxiliary build of "/checkout/src/test/ui-fulldeps/auxiliary/roman-numerals.rs" failed to compile: 
2019-09-03T17:53:18.4189050Z status: exit code: 1
2019-09-03T17:53:18.4189984Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui-fulldeps/auxiliary/roman-numerals.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/roman-numerals-macro/auxiliary" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--crate-type" "dylib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/roman-numerals-macro/auxiliary"
2019-09-03T17:53:18.4190805Z ------------------------------------------
2019-09-03T17:53:18.4190837Z 
2019-09-03T17:53:18.4191184Z ------------------------------------------
2019-09-03T17:53:18.4191240Z stderr:
2019-09-03T17:53:18.4191240Z stderr:
2019-09-03T17:53:18.4191478Z ------------------------------------------
2019-09-03T17:53:18.4191523Z error[E0308]: mismatched types
2019-09-03T17:53:18.4191776Z   --> /checkout/src/test/ui-fulldeps/auxiliary/roman-numerals.rs:67:30
2019-09-03T17:53:18.4191823Z    |
2019-09-03T17:53:18.4191867Z LL |     reg.register_macro("rn", expand_rn);
2019-09-03T17:53:18.4191936Z    |                              ^^^^^^^^^ expected struct `syntax::tokenstream::TokenStream`, found reference
2019-09-03T17:53:18.4191981Z    |
2019-09-03T17:53:18.4192336Z    = note: expected type `for<'cx, 'r> fn(&'cx mut syntax::ext::base::ExtCtxt<'r>, syntax_pos::Span, syntax::tokenstream::TokenStream) -> std::boxed::Box<(dyn syntax::ext::base::MacResult + 'cx)>`
2019-09-03T17:53:18.4192736Z               found type `for<'r, 's, 't0> fn(&'r mut syntax::ext::base::ExtCtxt<'s>, syntax_pos::Span, &'t0 syntax::tokenstream::TokenStream) -> std::boxed::Box<(dyn syntax::ext::base::MacResult + 'static)> {expand_rn}`
2019-09-03T17:53:18.4192839Z error: aborting due to previous error
2019-09-03T17:53:18.4192866Z 
2019-09-03T17:53:18.4193099Z For more information about this error, try `rustc --explain E0308`.
2019-09-03T17:53:18.4193131Z 
---
2019-09-03T17:53:18.4194264Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:536:22
2019-09-03T17:53:18.4194317Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-09-03T17:53:18.4201644Z 
2019-09-03T17:53:18.4201891Z 
2019-09-03T17:53:18.4204891Z 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-fulldeps" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps" "--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 -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" "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"
2019-09-03T17:53:18.4205181Z 
2019-09-03T17:53:18.4205213Z 
2019-09-03T17:53:18.4214527Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-09-03T17:53:18.4214634Z Build completed unsuccessfully in 1:14:17
2019-09-03T17:53:18.4214634Z Build completed unsuccessfully in 1:14:17
2019-09-03T17:53:18.4271531Z == clock drift check ==
2019-09-03T17:53:18.4291462Z   local time: Tue Sep  3 17:53:18 UTC 2019
2019-09-03T17:53:18.7107273Z   network time: Tue, 03 Sep 2019 17:53:18 GMT
2019-09-03T17:53:18.7110630Z == end clock drift check ==
2019-09-03T17:53:19.3193446Z ##[error]Bash exited with code '1'.
2019-09-03T17:53:19.3272495Z ##[section]Starting: Checkout
2019-09-03T17:53:19.3274436Z ==============================================================================
2019-09-03T17:53:19.3274495Z Task         : Get sources
2019-09-03T17:53:19.3274543Z 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)

@matklad
Copy link
Member Author

matklad commented Sep 3, 2019

./x.py test src/test/ui-fulldeps/roman-numerals-macro.rs passed locally.

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Sep 3, 2019

📌 Commit 6136495 has been approved by petrochenkov

Centril added a commit to Centril/rust that referenced this pull request Sep 4, 2019
…nkov

use TokenStream rather than &[TokenTree] for built-in macros

That way, we don't loose the jointness info
bors added a commit that referenced this pull request Sep 4, 2019
Rollup of 10 pull requests

Successful merges:

 - #63166 (Add Result::cloned{,_err} and Result::copied{,_err})
 - #63930 (Account for doc comments coming from proc macros without spans)
 - #63985 (Stabilize pin_into_inner in 1.39.0)
 - #64023 (libstd fuchsia fixes)
 - #64030 (Fix unlock ordering in SGX synchronization primitives)
 - #64041 (use TokenStream rather than &[TokenTree] for built-in macros)
 - #64043 (Add some more tests for underscore imports)
 - #64092 (Update xLTO compatibility table in rustc book.)
 - #64120 (Move path parsing earlier)
 - #64123 (Added warning around code with reference to uninit bytes)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Sep 5, 2019
…nkov

use TokenStream rather than &[TokenTree] for built-in macros

That way, we don't loose the jointness info
Centril added a commit to Centril/rust that referenced this pull request Sep 5, 2019
…nkov

use TokenStream rather than &[TokenTree] for built-in macros

That way, we don't loose the jointness info
Centril added a commit to Centril/rust that referenced this pull request Sep 5, 2019
…nkov

use TokenStream rather than &[TokenTree] for built-in macros

That way, we don't loose the jointness info
bors added a commit that referenced this pull request Sep 5, 2019
Rollup of 11 pull requests

Successful merges:

 - #62848 (Use unicode-xid crate instead of libcore)
 - #63774 (Fix `window.hashchange is not a function`)
 - #63930 (Account for doc comments coming from proc macros without spans)
 - #64003 (place: Passing `align` = `layout.align.abi`, when also passing `layout`)
 - #64030 (Fix unlock ordering in SGX synchronization primitives)
 - #64041 (use TokenStream rather than &[TokenTree] for built-in macros)
 - #64051 (Add x86_64-linux-kernel target)
 - #64063 (Fix const_err with `-(-0.0)`)
 - #64083 (Point at appropriate arm on type error on if/else/match with one non-! arm)
 - #64100 (Fix const eval bug breaking run-pass tests in Miri)
 - #64157 (Opaque type locations in error message for clarity.)

Failed merges:

r? @ghost
@bors bors merged commit 6136495 into rust-lang:master Sep 5, 2019
@matklad matklad deleted the token-stream-tt branch September 5, 2019 16:30
bors added a commit to rust-lang/cargo that referenced this pull request Sep 6, 2019
Fix test for changes in plugin API.

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

Successfully merging this pull request may close these issues.

None yet

7 participants