8000 Rollup of 6 pull requests by Centril · Pull Request #69271 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 6 pull requests #69271

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

Merged
merged 31 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0663f25
Always qualify literals by type
matthewjasper Feb 3, 2020
f2980e7
Add fast path for is_freeze
matthewjasper Feb 15, 2020
2fd1544
ast: move Generics into AssocItemKinds
Centril Feb 13, 2020
f06df16
ast: colocate AssocItem with ForeignItem
Centril Feb 13, 2020
e2ae717
ast: tweak comments of Foreign/AssocItemKind
Centril Feb 13, 2020
95dc9b9
ast: normalize `ForeignItemKind::Ty` & `AssocItemKind::TyAlias`.
Centril Feb 14, 2020
f3e9763
ast: make `= <expr>;` optional in free statics/consts.
Centril Feb 14, 2020
1c2906e
ast/parser: fuse `static` & `const` grammars in all contexts.
Centril Feb 14, 2020
f8d2264
parse associated statics.
Centril Feb 15, 2020
35884fe
parse extern consts
Centril Feb 15, 2020
91110fd
ast: make ForeignItemKind an alias of AssocItemKind
Centril Feb 15, 2020
0e0c028
fuse extern & associated item parsing up to defaultness
Centril Feb 15, 2020
cf87edf
pprust: unify extern & associated item printing
Centril Feb 15, 2020
5abedd8
visit: unify extern & assoc item visiting
Centril Feb 15, 2020
d6238bd
reject assoc statics & extern consts during parsing
Centril Feb 15, 2020
8000
fe62bed
print_item_const: remove extraneous space
Centril Feb 15, 2020
f12ae4a
ast: tweak AssocItemKind::Macro comment
Centril Feb 15, 2020
8bafe88
Select an appropriate unused lifetime name in suggestion
estebank Feb 14, 2020
045b7d5
ast: add a FIXME
Centril Feb 17, 2020
2e07892
Do not emit note suggesting to implement trait to foreign type
LeSeulArtichaut Feb 16, 2020
0b1e08c
parse: recover `mut (x @ y)` as `(mut x @ mut y)`.
Centril Feb 17, 2020
d33b356
parser: Do not call `bump` recursively
petrochenkov Feb 16, 2020
ed2fd28
parser: Set previous and unnormalized tokens in couple more places
petrochenkov Feb 16, 2020
06fbb0b
parser: Remove `Option`s from unnormalized tokens
petrochenkov Feb 16, 2020
950845c
Add a test for proc macro generating `$ IDENT`
petrochenkov Feb 17, 2020
5e2a095
Rollup merge of #69146 - matthewjasper:literal-qualif, r=eddyb
Centril Feb 18, 2020
981acd9
Rollup merge of #69159 - estebank:use-appropriate-lt-name, r=ecstatic…
Centril Feb 18, 2020
b864d23
Rollup merge of #69194 - Centril:assoc-extern-fuse, r=petrochenkov
Centril Feb 18, 2020
1cf0194
Rollup merge of #69211 - petrochenkov:prevtok, r=Centril
Centril Feb 18, 2020
c499570
Rollup merge of #69217 - LeSeulArtichaut:remove-lint-impl-op, r=estebank
Centril Feb 18, 2020
6c6d45c
Rollup merge of #69236 - Centril:mut-parens-at-recovery, r=estebank
Centril Feb 18, 2020
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
Prev Previous commit
Next Next commit
Add a test for proc macro generating $ IDENT
  • Loading branch information
petrochenkov committed Feb 17, 2020
commit 950845c5b1079c83e56db0ca2b4bb8fe050ee2f5
17 changes: 17 additions & 0 deletions src/test/ui/proc-macro/auxiliary/generate-dollar-ident.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// force-host
// no-prefer-dynamic

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

extern crate proc_macro;
use proc_macro::*;

#[proc_macro]
pub fn dollar_ident(input: TokenStream) -> TokenStream {
let black_hole = input.into_iter().next().unwrap();
quote! {
$black_hole!($$var);
}
}
18 changes: 18 additions & 0 deletions src/test/ui/proc-macro/generate-dollar-ident.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Proc macros can generate token sequence `$ IDENT`
// without it being recognized as an unknown macro variable.

// check-pass
// aux-build:generate-dollar-ident.rs

extern crate generate_dollar_ident;
use generate_dollar_ident::*;

macro_rules! black_hole {
($($tt:tt)*) => {};
}

black_hole!($var);

dollar_ident!(black_hole);

fn main() {}
0