Skip to content
Closed
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
0687b78
Speed up bootstrap a little.
ehuss Jun 13, 2020
e32db84
Add rust features to print target features
aszenz Jun 14, 2020
607e851
Switch bootstrap metadata to --no-deps.
ehuss Jun 14, 2020
c2b920f
Show suite paths (`src/test/ui/...`) in help output.
ehuss Jun 14, 2020
f17fd7b
Add some doc comments regarding PathSet.
ehuss Jun 15, 2020
8e7606f
bootstrap/install.rs: support a nonexistent `prefix` in `x.py install`
nodakai Jun 14, 2020
4eef51a
Cache decoded predicate shorthands
matthewjasper Jun 10, 2020
4709f45
Cache flags and escaping vars for predicates
matthewjasper Jun 10, 2020
2e17245
Replace `is_global` call on data with call on predicate
matthewjasper Jun 10, 2020
a4337cc
Use `LocalDefId` for import IDs in trait map
petrochenkov Jun 14, 2020
fc13fd0
typeck: Use `LocalDefId`s for the unused trait import set
petrochenkov Jun 15, 2020
8956a7f
Only display other method receiver candidates if they actually apply
Aaron1011 Jun 15, 2020
792bd3b
lint: normalize projections using opaque types
davidtwco Jun 12, 2020
a19dfb5
Create new E0763 error code for unterminated byte constant
GuillaumeGomez Jun 12, 2020
bad252c
Update ui tests
GuillaumeGomez Jun 12, 2020
83e6c0e
Update CFGuard syntax
ajpaverd Jun 16, 2020
4506a35
add header for rust specific feature
aszenz Jun 16, 2020
9f50f84
break long line for formatting
aszenz Jun 16, 2020
457acbd
trim whitespace
aszenz Jun 16, 2020
caffb28
add blank line bw sections
aszenz Jun 17, 2020
f633dd3
Implement crate level only lints checking.
crlf0710 Jun 13, 2020
1189841
Rollup merge of #73180 - matthewjasper:predicate-cache, r=nikomatsakis
Manishearth Jun 19, 2020
0b50373
Rollup merge of #73280 - GuillaumeGomez:add-e0763, r=petrochenkov
Manishearth Jun 19, 2020
43fc34c
Rollup merge of #73287 - davidtwco:issue-73251-opaque-types-in-projec…
Manishearth Jun 19, 2020
2faa2a2
Rollup merge of #73300 - crlf0710:crate_level_only_check, r=petrochenkov
Manishearth Jun 19, 2020
1dfba21
Rollup merge of #73346 - aszenz:patch-1, r=cuviper
Manishearth Jun 19, 2020
50a7dce
Rollup merge of #73350 - nodakai:install-rs-support-nonexistent-prefi…
Manishearth Jun 19, 2020
2ec6bf0
Rollup merge of #73352 - ehuss:bootstrap-metadata, r=Mark-Simulacrum
Manishearth Jun 19, 2020
3e4140d
Rollup merge of #73357 - petrochenkov:tmap, r=davidtwco
Manishearth Jun 19, 2020
fc3e911
Rollup merge of #73382 - Aaron1011:fix/self-receiver-candidates, r=pe…
Manishearth Jun 19, 2020
dc3ca0f
Rollup merge of #73404 - ajpaverd:cfguard_syntax, r=Mark-Simulacrum
Manishearth Jun 19, 2020
File filter

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
Create new E0763 error code for unterminated byte constant
  • Loading branch information
GuillaumeGomez committed Jun 16, 2020
commit a19dfb573d18c8b937c159cda24a3bb40ca5082d
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 @@ -442,6 +442,7 @@ E0758: include_str!("./error_codes/E0758.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