Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
22c4ee3
Improve error message for const extern fn
Manishearth May 30, 2017
0fba1f7
Update rust-installer for Windows executable mode
cuviper Jun 1, 2017
0967e24
Deprecate Range*::step_by
scottmcm May 23, 2017
1723e06
Deprecate iter::range::StepBy
scottmcm May 30, 2017
15dff84
Avoid range::step_by in another test
scottmcm May 30, 2017
edefcb2
Don't byteswap Fingerprints when encoding
jcowgill May 31, 2017
a74338d
rustdoc: Rename `Vector` and `FixedVector` to `Slice` and `Array`
ollie27 May 31, 2017
24671ba
Syntax highlight rust code in librustc/dep_graph/README.md
bjorn3 Jun 1, 2017
da100fe
Support VS 2017
brson May 24, 2017
4880ae8
rustbuild: Add `./x.py test --no-fail-fast`
cuviper Jun 1, 2017
818ca98
Add [[T]] -> [T] examples to SliceConcatExt docs
mbrubeck Jun 2, 2017
94de732
Rollup merge of #42225 - brson:vs2017, r=alexcrichton
Mark-Simulacrum Jun 2, 2017
2a77cf1
Rollup merge of #42310 - scottmcm:deprecate-range-stepby, r=alexcrichton
Mark-Simulacrum Jun 2, 2017
88d3e07
Rollup merge of #42319 - Manishearth:const-extern, r=nikomatsakis
Mark-Simulacrum Jun 2, 2017
b12f047
Rollup merge of #42335 - jcowgill:fingerprint-be, r=michaelwoerister
Mark-Simulacrum Jun 2, 2017
fb0842a
Rollup merge of #42343 - cuviper:install-executables, r=alexcrichton
Mark-Simulacrum Jun 2, 2017
7a56e2b
Rollup merge of #42355 - bjorn3:patch-1, r=Mark-Simulacrum
Mark-Simulacrum Jun 2, 2017
739c5ab
Rollup merge of #42360 - ollie27:rustdoc_vector_rename, r=GuillaumeGomez
Mark-Simulacrum Jun 2, 2017
0e8135f
Rollup merge of #42363 - cuviper:no-fail-fast, r=alexcrichton
Mark-Simulacrum Jun 2, 2017
a891be4
Rollup merge of #42370 - mbrubeck:docs, r=frewsxcv
Mark-Simulacrum Jun 2, 2017
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
4 changes: 4 additions & 0 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5985,6 +5985,10 @@ impl<'a> Parser<'a> {
return Ok(Some(self.parse_item_foreign_fn(visibility, lo, attrs)?));
}

if self.check_keyword(keywords::Const) {
return Err(self.span_fatal(self.span, "extern items cannot be `const`"));
}

// FIXME #5668: this will occur for a macro invocation:
match self.parse_macro_use_or_failure(attrs, true, false, lo, visibility)? {
Some(item) => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/parse-fail/removed-syntax-extern-const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

extern {
const i: isize;
//~^ ERROR expected one of `fn`, `pub`, `static`, or `}`, found `const`
//~^ ERROR extern items cannot be `const`
}