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

Rollup of 16 pull requests #81523

Closed
wants to merge 40 commits into from
Closed
Changes from 2 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8539425
Stabilize unsigned_abs
jhpratt Jan 13, 2021
edf2e37
Use unsigned_abs throughout repository
jhpratt Jan 13, 2021
0c8db16
Add `core::stream::Stream`
yoshuawuyts Nov 13, 2020
e94cf57
Make functional record update/struct update syntax works inside closu…
null-sleep Jan 23, 2021
a1b1132
Remove `Stream::next`
yoshuawuyts Jan 15, 2021
d00c850
BTreeMap: correct tests for alternative choices of B
ssomers Jan 20, 2021
328abfb
Slight simplification of chars().count()
gilescope Jan 26, 2021
425a70a
Removing if so it's more like the previous implementation.
gilescope Jan 26, 2021
c07e558
Let's try the most idiomatic way.
gilescope Jan 26, 2021
a623ea5
Same instructions, but simpler.
gilescope Jan 26, 2021
063b427
Bump rustfmt version
Mark-Simulacrum Jan 9, 2021
5d73918
Clone entire `TokenCursor` when collecting tokens
Aaron1011 Jan 28, 2021
ad14924
path trimming: ignore type aliases
da-x Jan 28, 2021
9dc0d1d
path trimming: disable on src/test/run-make-fulldeps/coverage-spanview
da-x Jan 28, 2021
a6fa92c
Balance sidebar `Deref` cycle check with main content
jryans Jan 28, 2021
f620b5c
rustdoc: Remove unnecessary optional
camelid Jan 29, 2021
02094f9
Updated Vec::splice documentation
SOF3 Jan 29, 2021
5e983d7
Add a test for syntax like: ..t.s
null-sleep Jan 29, 2021
63714af
update rustfmt to v1.4.34
calebcartwright Jan 29, 2021
d8b5745
Treat nightlies for a version as complete
est31 Jan 28, 2021
dd18c48
Add tests
est31 Jan 28, 2021
08141a5
Add missiong variants in match binding
GuillaumeGomez Jan 29, 2021
13ffa43
rename raw_const/mut -> const/mut_addr_of, and stabilize them
RalfJung Jan 10, 2021
718398c
Fix typo in pat.rs
eltociear Jan 29, 2021
2987f03
Rollup merge of #78052 - da-x:path-trimming-type-aliases, r=davidtwco
jonas-schievink Jan 29, 2021
e711d79
Rollup merge of #79023 - yoshuawuyts:stream, r=KodrAus
jonas-schievink Jan 29, 2021
f6932d7
Rollup merge of #80843 - Mark-Simulacrum:fmt-bump, r=petrochenkov
jonas-schievink Jan 29, 2021
0648f5d
Rollup merge of #80886 - RalfJung:stable-raw-ref-macros, r=m-ou-se
jonas-schievink Jan 29, 2021
e222fde
Rollup merge of #80959 - jhpratt:unsigned_abs-stabilization, r=m-ou-se
jonas-schievink Jan 29, 2021
2b23c7f
Rollup merge of #81210 - ssomers:btree_fix_node_size_test, r=Mark-Sim…
jonas-schievink Jan 29, 2021
f7e2e37
Rollup merge of #81291 - sexxi-goose:fix-struct-update-functional-rec…
jonas-schievink Jan 29, 2021
bd44c36
Rollup merge of #81409 - gilescope:chars_count, r=joshtriplett
jonas-schievink Jan 29, 2021
444f2af
Rollup merge of #81468 - est31:cfg_version, r=petrochenkov
jonas-schievink Jan 29, 2021
b6b76dd
Rollup merge of #81472 - Aaron1011:fix/revert-cursor-clone, r=petroch…
jonas-schievink Jan 29, 2021
136e37d
Rollup merge of #81491 - jryans:rustdoc-deref-ice-81395, r=GuillaumeG…
jonas-schievink Jan 29, 2021
6b35385
Rollup merge of #81495 - camelid:rustdoc-output_format-optional, r=Gu…
jonas-schievink Jan 29, 2021
01898a2
Rollup merge of #81499 - SOF3:patch-1, r=sanxiyn
jonas-schievink Jan 29, 2021
1244551
Rollup merge of #81501 - calebcartwright:update-rustfmt, r=sanxiyn
jonas-schievink Jan 29, 2021
e56472c
Rollup merge of #81512 - GuillaumeGomez:cleanup-fixme-rustdoc, r=buga…
jonas-schievink Jan 29, 2021
bb999f7
Rollup merge of #81515 - eltociear:patch-7, r=jonas-schievink
jonas-schievink Jan 29, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions compiler/rustc_parse/src/parser/mod.rs
Original file line number Diff line number Diff line change
@@ -1254,15 +1254,7 @@ impl<'a> Parser<'a> {
f: impl FnOnce(&mut Self) -> PResult<'a, (R, TrailingToken)>,
) -> PResult<'a, R> {
let start_token = (self.token.clone(), self.token_spacing);
let cursor_snapshot = TokenCursor {
frame: self.token_cursor.frame.clone(),
// We only ever capture tokens within our current frame,
// so we can just use an empty frame stack
stack: vec![],
desugar_doc_comments: self.token_cursor.desugar_doc_comments,
num_next_calls: self.token_cursor.num_next_calls,
append_unglued_token: self.token_cursor.append_unglued_token.clone(),
};
let cursor_snapshot = self.token_cursor.clone();

let (mut ret, trailing_token) = f(self)?;

23 changes: 23 additions & 0 deletions src/test/ui/proc-macro/auxiliary/nonterminal-recollect-attr.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// force-host
// no-prefer-dynamic

#![crate_type = "proc-macro"]
#![feature(proc_macro_quote)]

extern crate proc_macro;
use proc_macro::{TokenStream, quote};

#[proc_macro_attribute]
pub fn first_attr(_: TokenStream, input: TokenStream) -> TokenStream {
let recollected: TokenStream = input.into_iter().collect();
quote! {
#[second_attr]
$recollected
}
}

#[proc_macro_attribute]
pub fn second_attr(_: TokenStream, input: TokenStream) -> TokenStream {
let _recollected: TokenStream = input.into_iter().collect();
TokenStream::new()
}
17 changes: 17 additions & 0 deletions src/test/ui/proc-macro/nonterminal-recollect-attr.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// check-pass
// aux-build:nonterminal-recollect-attr.rs

extern crate nonterminal_recollect_attr;
use nonterminal_recollect_attr::*;

macro_rules! my_macro {
($v:ident) => {
#[first_attr]
$v struct Foo {
field: u8
}
}
}

my_macro!(pub);
fn main() {}