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 15 pull requests #73455

Closed
wants to merge 55 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
d4fe955
Implement partial error recovery for `let` with `BinOpEq`
mibac138 May 7, 2020
48ff12a
Expand partial error recovery for `let` with `BinOpEq`
mibac138 May 7, 2020
05d6531
Error recovery for `let` with `+=`
mibac138 May 7, 2020
6ad24ba
Adjust according to estebank's review comments
mibac138 May 7, 2020
98532a3
Adjust according to petrochenkov's review comments
mibac138 May 20, 2020
1bc4e45
Only highlight results via mouseover if mouse has moved
carols10cents Jun 2, 2020
bbb3321
Ensure std benchmarks get tested.
ehuss Jun 8, 2020
f0d2e78
add raw_ref macros
RalfJung Jun 12, 2020
724dfba
Clean up some weird command strings
GuillaumeGomez Jun 13, 2020
d5ea0e9
Report error when casting an C-like enum implementing Drop
oddg May 15, 2020
a40156e
UI test for deprecation warning of casting enum implementing Drop
oddg Jun 14, 2020
9e51008
Complete the std::time documentation to warn about the inconsistencie…
poliorcetics Jun 15, 2020
81c9094
Suggest substituting `'static` lifetime in impl/dyn `Trait + 'static`…
estebank May 29, 2020
4e90f17
When `'static` is explicit, suggest constraining argument with it
estebank May 30, 2020
921f35f
Reduce verbosity of suggestion message and mention lifetime in label
estebank May 30, 2020
e755889
Move overlapping span to a note
estebank May 30, 2020
bc15790
Tweak output for overlapping required/captured spans
estebank May 30, 2020
539e978
Tweak wording and add error code
estebank May 30, 2020
31ea589
review comments: wording
estebank Jun 1, 2020
10d9bf1
Use note for requirement source span
estebank Jun 2, 2020
34d8692
Register new eror code
estebank Jun 2, 2020
e31367d
small tweaks
estebank Jun 2, 2020
f7a1f97
Change E0758 to E0759 to avoid conflict with #72912
estebank Jun 3, 2020
bfe1434
fix rebase
estebank Jun 15, 2020
b5809b0
Update src/librustc_typeck/check/cast.rs
nikomatsakis Jun 15, 2020
96f5584
Expand "recursive opaque type" diagnostic
estebank Apr 19, 2020
8f12485
review comments
estebank Jun 15, 2020
f3dfe80
Adjust error message
oddg Jun 16, 2020
0265e4e
add tracking issue
RalfJung Jun 16, 2020
5fbef22
warn against 'specialization' feature
RalfJung May 17, 2020
991dfe7
bless all
RalfJung Jun 16, 2020
d1265e7
libcore tests: use min_specialization
RalfJung Jun 16, 2020
a19dfb5
Create new E0763 error code for unterminated byte constant
GuillaumeGomez Jun 12, 2020
bad252c
Update ui tests
GuillaumeGomez Jun 12, 2020
1990f97
Disallow loading crates with non-ascii identifier name.
crlf0710 Jun 13, 2020
7a9f29d
Add initial asm!() support for hexagon
androm3da Jun 9, 2020
9f2e8ad
Fix typo in librustc_ast docs
pierwill Jun 17, 2020
c9dc73d
Make novel structural match violations a warning
ecstatic-morse Jun 17, 2020
38e921b
Add regression test for #73431
ecstatic-morse Jun 17, 2020
3a1207f
Add issue number to novel violation warning
ecstatic-morse Jun 17, 2020
c0d3f22
Rollup merge of #71338 - estebank:recursive-impl-trait, r=nikomatsakis
tmandry Jun 17, 2020
c6b7e04
Rollup merge of #71420 - RalfJung:specialization-incomplete, r=matthe…
tmandry Jun 17, 2020
7dc7390
Rollup merge of #71976 - mibac138:let-recovery, r=estebank
tmandry Jun 17, 2020
4ffa200
Rollup merge of #72279 - RalfJung:raw-ref-macros, r=nikomatsakis
tmandry Jun 17, 2020
3a29574
Rollup merge of #72331 - oddg:forbid-cast-of-cenum-implementing-drop,…
tmandry Jun 17, 2020
d75230e
Rollup merge of #72804 - estebank:opaque-missing-lts-in-fn-2, r=nikom…
tmandry Jun 17, 2020
c9bad78
Rollup merge of #72836 - poliorcetics:std-time-os-specificities, r=sh…
tmandry Jun 17, 2020
8d5c764
Rollup merge of #72968 - integer32llc:docs-arrow-keys, r=GuillaumeGomez
tmandry Jun 17, 2020
a37e271
Rollup merge of #73142 - ehuss:std-benches, r=dtolnay
tmandry Jun 17, 2020
53cc5af
Rollup merge of #73214 - androm3da:hex_inline_asm_00, r=Amanieu
tmandry Jun 17, 2020
9f204c6
Rollup merge of #73280 - GuillaumeGomez:add-e0763, r=petrochenkov
tmandry Jun 17, 2020
1b32e50
Rollup merge of #73305 - crlf0710:disallow_loading_monsters, r=petroc…
tmandry Jun 17, 2020
a4c07cd
Rollup merge of #73315 - GuillaumeGomez:clean-up-config-strs, r=kinnison
tmandry Jun 17, 2020
172e3cd
Rollup merge of #73428 - pierwill:patch-1, r=jonas-schievink
tmandry Jun 17, 2020
db841ab
Rollup merge of #73446 - ecstatic-morse:issue-73431, r=pnkfelix
tmandry Jun 17, 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
1 change: 1 addition & 0 deletions src/librustc_error_codes/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ E0759: include_str!("./error_codes/E0759.md"),
E0760: include_str!("./error_codes/E0760.md"),
E0761: include_str!("./error_codes/E0761.md"),
E0762: include_str!("./error_codes/E0762.md"),
E0763: include_str!("./error_codes/E0763.md"),
;
// E0006, // merged with E0005
// E0008, // cannot bind by-move into a pattern guard
Expand Down
13 changes: 13 additions & 0 deletions src/librustc_error_codes/error_codes/E0763.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
A byte constant wasn't correctly ended.

Erroneous code example:

```compile_fail,E0763
let c = b'a; // error!
```

To fix this error, add the missing quote:

```
let c = b'a'; // ok!
```
11 changes: 9 additions & 2 deletions src/librustc_parse/lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,15 @@ impl<'a> StringReader<'a> {
}
rustc_lexer::LiteralKind::Byte { terminated } => {
if !terminated {
self.fatal_span_(start + BytePos(1), suffix_start, "unterminated byte constant")
.raise()
self.sess
.span_diagnostic
.struct_span_fatal_with_code(
self.mk_sp(start + BytePos(1), suffix_start),
"unterminated byte constant",
error_code!(E0763),
)
.emit();
FatalError.raise();
}
(token::Byte, Mode::Byte, 2, 1) // b' '
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/parser/byte-literals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ pub fn main() {
b' '; //~ ERROR byte constant must be escaped
b'''; //~ ERROR byte constant must be escaped
b'é'; //~ ERROR byte constant must be ASCII
b'a //~ ERROR unterminated byte constant
b'a //~ ERROR unterminated byte constant [E0763]
}
3 changes: 2 additions & 1 deletion src/test/ui/parser/byte-literals.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ error: byte constant must be ASCII. Use a \xHH escape for a non-ASCII byte
LL | b'é';
| ^

error: unterminated byte constant
error[E0763]: unterminated byte constant
--> $DIR/byte-literals.rs:11:6
|
LL | b'a
| ^^^^

error: aborting due to 7 previous errors

For more information about this error, try `rustc --explain E0763`.