Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
6bf2cc2
Avoid instantiating many `Parser` structs in `generic_extension`.
nnethercote Feb 4, 2020
f840a95
Remove the `Cow` from `Directory`.
nnethercote Feb 5, 2020
2a13b24
Change condition ordering in `parse_tt`.
nnethercote Feb 5, 2020
3998249
remove unnecessary local variable assignment in context manager
chrissimpkins Feb 8, 2020
19aaf63
PEP8 format spacing
chrissimpkins Feb 8, 2020
6ce8d2b
PEP8 format spacing
chrissimpkins Feb 8, 2020
adde3d4
PEP8 format spacing
chrissimpkins Feb 8, 2020
60889d4
remove unnecessary semicolons
chrissimpkins Feb 8, 2020
e30dd86
PEP8 format spacing
chrissimpkins Feb 8, 2020
f38e270
remove unnecessary sys import
chrissimpkins Feb 8, 2020
d366343
PEP8 format spacing
chrissimpkins Feb 8, 2020
a53f45f
PEP8 format spacing, split import statements
chrissimpkins Feb 8, 2020
8d04b95
remove unnecessary import statement
chrissimpkins Feb 8, 2020
85e3661
PEP8 format spacing, remove unnecessary local variable assignment
chrissimpkins Feb 8, 2020
814aa06
PEP8 format spacing
chrissimpkins Feb 8, 2020
9b10fc4
remove unnecessary import statement, PEP8 format spacing
chrissimpkins Feb 8, 2020
77d158d
shorten comment blocks to < 100 characters
chrissimpkins Feb 8, 2020
202d401
miri: simplify singed operator overflow detection
RalfJung Feb 9, 2020
28f85c6
bring back extra check for int_min%-1
RalfJung Feb 9, 2020
7d2f6ae
miri: equip unary_op with overflow detection
RalfJung Feb 8, 2020
ae23f70
const-prop: use overflowing_unary_op for overflowing checking of unar…
RalfJung Feb 9, 2020
b434d7e
add test that checks overflows on arithmetic operators
RalfJung Feb 10, 2020
1ddb050
div/rem overflow tests: also test i128
RalfJung Feb 10, 2020
d6c5a04
some more tests for i128 oveflow behavior
RalfJung Feb 10, 2020
9e78ce0
handle TerminatorKind::Yield by returning Err(Unpromotable)
chrissimpkins Feb 10, 2020
fc3ecb2
add issue 69017 test
chrissimpkins Feb 10, 2020
8d79921
parser: Remove `Parser::prev_token_kind`
petrochenkov Feb 10, 2020
25de80a
Remove common usage pattern from `AllocRef`
TimDiekmann Feb 10, 2020
97d1f8d
Add missing `_zeroed` varants to `AllocRef`
TimDiekmann Feb 10, 2020
53b16fb
add main function to issue-69017 test
chrissimpkins Feb 10, 2020
aeedc9d
Corrected ac_mitigation patch. That patch used the untrusted stack to…
raoulstrackx Feb 7, 2020
236ab6e
sanitize MXCSR/FPU control registers
raoulstrackx Feb 7, 2020
71b9ed4
Avoid jumping to Rust code with user %rsp (reentry_panic)
Feb 10, 2020
c561d23
remove outdated comment
RalfJung Feb 10, 2020
b637c0e
Add initial debug fmt for Backtrace
yaahc Feb 10, 2020
4920456
Get vaguely working with a test for checking output
yaahc Feb 10, 2020
c0ba79e
less noisy format
yaahc Feb 10, 2020
0d5444f
remove unnecessary derives
yaahc Feb 10, 2020
76e6d6f
remove unnecessary Debug impl for BacktraceFrame
yaahc Feb 10, 2020
583dd2c
make it compile
yaahc Feb 10, 2020
8711778
final format cleanups
yaahc Feb 10, 2020
70c9133
remove Some from fn name
yaahc Feb 10, 2020
230ed3e
use debug_map and skip empty frames
yaahc Feb 11, 2020
de25048
add nice alt fmt for debug
yaahc Feb 11, 2020
192b103
make symbol printing consistent with backtrace_rs
yaahc Feb 11, 2020
7064a0e
maximum alternative consistency!
yaahc Feb 11, 2020
6797bfd
rule over the code in libstd with an iron fist
yaahc Feb 11, 2020
c8817aa
backwards again, god damnit
yaahc Feb 11, 2020
76aa29f
Preparation for allocator aware `Box`
TimDiekmann Feb 11, 2020
ec8ee7f
remove intentionally failing test
yaahc Feb 11, 2020
3884311
Add self to .mailmap
Bassetts Feb 11, 2020
df85455
Rollup merge of #68848 - nnethercote:hasten-macro-parsing, r=petroche…
jonas-schievink Feb 11, 2020
84de78e
Rollup merge of #68947 - chrissimpkins:python-fmt, r=alexcrichton
jonas-schievink Feb 11, 2020
eca99ba
Rollup merge of #69002 - RalfJung:miri-op-overflow, r=oli-obk,wesleyw…
jonas-schievink Feb 11, 2020
ec82d15
Rollup merge of #69026 - TimDiekmann:common-usage, r=Amanieu
jonas-schievink Feb 11, 2020
6dcfc75
Rollup merge of #69027 - TimDiekmann:zeroed-alloc, r=Amanieu
jonas-schievink Feb 11, 2020
df7f0c5
Rollup merge of #69032 - chrissimpkins:ice-yield-println-#69017, r=pe…
jonas-schievink Feb 11, 2020
29f780a
Rollup merge of #69034 - petrochenkov:notokind, r=Centril
jonas-schievink Feb 11, 2020
39789c9
Rollup merge of #69038 - yaahc:backtrace-debug, r=dtolnay
jonas-schievink Feb 11, 2020
fe61f59
Rollup merge of #69040 - jethrogb:jb/cleanup-sgx-entry, r=nagisa
jonas-schievink Feb 11, 2020
abe9d82
Rollup merge of #69058 - TimDiekmann:box, r=Amanieu
jonas-schievink Feb 11, 2020
dae1a51
Rollup merge of #69070 - Bassetts:master, r=alexcrichton
jonas-schievink Feb 11, 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
Change condition ordering in parse_tt.
This is a small win, because `Failure` is much more common than
`Success`.
  • Loading branch information
nnethercote committed Feb 6, 2020
commit 2a13b24d369b8619f0197993cd5dc60f7217ed72
12 changes: 6 additions & 6 deletions src/librustc_expand/mbe/macro_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,14 @@ pub(super) fn parse_tt(parser: &mut Cow<'_, Parser<'_>>, ms: &[TokenTree]) -> Na
// unnecessary implicit clone later in Rc::make_mut.
drop(eof_items);

// If there are no possible next positions AND we aren't waiting for the black-box parser,
// then there is a syntax error.
if bb_items.is_empty() && next_items.is_empty() {
return Failure(parser.token.clone(), "no rules expected this token in macro call");
}
// Another possibility is that we need to call out to parse some rust nonterminal
// (black-box) parser. However, if there is not EXACTLY ONE of these, something is wrong.
if (!bb_items.is_empty() && !next_items.is_empty()) || bb_items.len() > 1 {
else if (!bb_items.is_empty() && !next_items.is_empty()) || bb_items.len() > 1 {
let nts = bb_items
.iter()
.map(|item| match item.top_elts.get_tt(item.idx) {
Expand All @@ -713,11 +718,6 @@ pub(super) fn parse_tt(parser: &mut Cow<'_, Parser<'_>>, ms: &[TokenTree]) -> Na
),
);
}
// If there are no possible next positions AND we aren't waiting for the black-box parser,
// then there is a syntax error.
else if bb_items.is_empty() && next_items.is_empty() {
return Failure(parser.token.clone(), "no rules expected this token in macro call");
}
// Dump all possible `next_items` into `cur_items` for the next iteration.
else if !next_items.is_empty() {
// Now process the next token
Expand Down