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 10 pull requests #64644

Closed
wants to merge 34 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e608549
Filter out stmts made for the redundant_semicolon lint when pretty-pr…
nathanwhit Sep 12, 2019
96526d4
Add test for redundant_semicolon lint interaction with proc macro attrs
nathanwhit Sep 12, 2019
612ef5f
add new tests for re_rebalance_coherence
nikomatsakis Sep 12, 2019
e69d1b6
change to check-pass
nikomatsakis Sep 13, 2019
194d357
Document `From` trait for `LhsExpr`
crgl Sep 3, 2019
3f004a1
Fix re-rebalance coherence implementation for fundamental types
weiznich Sep 17, 2019
a9c38d9
Add more tests
weiznich Sep 18, 2019
31b3012
Split line to fix tidy
weiznich Sep 18, 2019
8112f71
rustbuild: Turn down compression on exe installers
alexcrichton Sep 19, 2019
1ab5593
factor out pluralisation remains after #64280
Sep 19, 2019
fde8cfe
rustbuild: Turn down compression on msi installers
alexcrichton Sep 19, 2019
255dd3f
rustbuild: Improve output of `dist` step
alexcrichton Sep 19, 2019
3db2c13
Add Compatibility Notes to RELEASES.md for 1.38.0
XAMPPRocky Sep 19, 2019
e625f62
Support run-fail ui tests
tmandry Sep 20, 2019
78ff110
Spawn one subprocess per unit test
tmandry Sep 12, 2019
52e4919
Only spawn subprocesses when panic=abort
tmandry Sep 12, 2019
c6b4fb7
Remove panic_unwind requirement from libtest
tmandry Sep 12, 2019
df24055
Factor inner test runners out, simplify RunStrategy
tmandry Sep 13, 2019
e6015e4
Include signal from terminated child process on unix
tmandry Sep 14, 2019
c792c25
Use just two return codes to communicate result
tmandry Sep 19, 2019
c396c12
Add test for libtest panic=abort mode
tmandry Sep 20, 2019
6f36f87
Put panic=abort test support behind -Z panic_abort_tests
tmandry Sep 20, 2019
c3140ba
remove the extra comma after the match arm
Sep 20, 2019
6bd568b
Ignore panic=abort tests on wasm, emscripten
tmandry Sep 20, 2019
54cb754
Rollup merge of #64136 - crgl:doc-from-parser-lhs, r=Centril
tmandry Sep 20, 2019
b3dc351
Rollup merge of #64158 - tmandry:libtest-panic-abort, r=alexcrichton
tmandry Sep 20, 2019
23483e7
Rollup merge of #64342 - glorv:master, r=varkor
tmandry Sep 20, 2019
736b4ae
Rollup merge of #64387 - nathanwhit:redundant-semi-fix, r=varkor
tmandry Sep 20, 2019
7c32753
Rollup merge of #64546 - weiznich:bugfix/rfc-2451-rerebalance-tests, …
tmandry Sep 20, 2019
5600137
Rollup merge of #64615 - alexcrichton:smaller-exe, r=Mark-Simulacrum
tmandry Sep 20, 2019
1b63b18
Rollup merge of #64617 - alexcrichton:smaller-msi, r=Mark-Simulacrum
tmandry Sep 20, 2019
5c10773
Rollup merge of #64618 - alexcrichton:improve-dist-output, r=Mark-Sim…
tmandry Sep 20, 2019
4140eda
Rollup merge of #64621 - XAMPPRocky:relnotes, r=Mark-Simulacrum
tmandry Sep 20, 2019
d70ee2c
Rollup merge of #64632 - guanqun:patch-1, r=jonas-schievink
tmandry Sep 20, 2019
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 test for redundant_semicolon lint interaction with proc macro attrs
nathanwhit committed Sep 12, 2019
commit 96526d401113c28b765d40c99d4d28f499c6b512
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// no-prefer-dynamic
#![crate_type="proc-macro"]
#![crate_name="redundant_semi_proc_macro"]
extern crate proc_macro;
use proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn should_preserve_spans(_attr: TokenStream, item: TokenStream) -> TokenStream {
eprintln!("{:?}", item);
item
}
19 changes: 19 additions & 0 deletions src/test/ui/lint/redundant-semicolon/redundant-semi-proc-macro.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// aux-build:redundant-semi-proc-macro-def.rs

#![deny(redundant_semicolon)]
extern crate redundant_semi_proc_macro;
use redundant_semi_proc_macro::should_preserve_spans;

#[should_preserve_spans]
fn span_preservation() {
let tst = 123;; //~ ERROR unnecessary trailing semicolon
match tst {
// Redundant semicolons are parsed as empty tuple exprs
// for the lint, so ensure the lint doesn't affect
// empty tuple exprs explicitly in source.
123 => (),
_ => ()
};;; //~ ERROR unnecessary trailing semicolons
}

fn main() {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
TokenStream [Ident { ident: "fn", span: #0 bytes(197..199) }, Ident { ident: "span_preservation", span: #0 bytes(200..217) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(217..219) }, Group { delimiter: Brace, stream: TokenStream [Ident { ident: "let", span: #0 bytes(227..230) }, Ident { ident: "tst", span: #0 bytes(231..234) }, Punct { ch: '=', spacing: Alone, span: #0 bytes(235..236) }, Literal { lit: Lit { kind: Integer, symbol: 123, suffix: None }, span: Span { lo: BytePos(237), hi: BytePos(240), ctxt: #0 } }, Punct { ch: ';', spacing: Joint, span: #0 bytes(240..241) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(241..242) }, Ident { ident: "match", span: #0 bytes(288..293) }, Ident { ident: "tst", span: #0 bytes(294..297) }, Group { delimiter: Brace, stream: TokenStream [Literal { lit: Lit { kind: Integer, symbol: 123, suffix: None }, span: Span { lo: BytePos(482), hi: BytePos(485), ctxt: #0 } }, Punct { ch: '=', spacing: Joint, span: #0 bytes(486..488) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(486..488) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(489..491) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(491..492) }, Ident { ident: "_", span: #0 bytes(501..502) }, Punct { ch: '=', spacing: Joint, span: #0 bytes(503..505) }, Punct { ch: '>', spacing: Alone, span: #0 bytes(503..505) }, Group { delimiter: Parenthesis, stream: TokenStream [], span: #0 bytes(506..508) }], span: #0 bytes(298..514) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(514..515) }, Punct { ch: ';', spacing: Joint, span: #0 bytes(515..516) }, Punct { ch: ';', spacing: Alone, span: #0 bytes(516..517) }], span: #0 bytes(221..561) }]
error: unnecessary trailing semicolon
--> $DIR/redundant-semi-proc-macro.rs:9:19
|
LL | let tst = 123;;
| ^ help: remove this semicolon
|
note: lint level defined here
--> $DIR/redundant-semi-proc-macro.rs:3:9
|
LL | #![deny(redundant_semicolon)]
| ^^^^^^^^^^^^^^^^^^^

error: unnecessary trailing semicolons
--> $DIR/redundant-semi-proc-macro.rs:16:7
|
LL | };;;
| ^^ help: remove these semicolons

error: aborting due to 2 previous errors