Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ae46434
Remove "static item recursion checking" in favor of relying on cycle …
Zoxc Feb 3, 2018
46a3f2f
Change error message for E0391 to "cyclic dependency detected"
Zoxc Feb 9, 2018
335e25f
incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to…
michaelwoerister Feb 13, 2018
75f72c0
Make nested impl Trait a hard error
cramertj Feb 8, 2018
70e1f4f
Disallow projections from impl Trait types
cramertj Feb 9, 2018
f1fbf79
Amend nested impl Trait error message
cramertj Feb 14, 2018
dbacf0c
Test err on impl Trait projection within dyn Trait
cramertj Feb 14, 2018
d4b8475
incr.comp.: Store DepNode colors in a dense array instead of a hashmap.
michaelwoerister Feb 13, 2018
9e9c55f
Update E0657 stderr to match changed test
cramertj Feb 14, 2018
fe0260f
mir: Gather move at SwitchInt, Assert terminators
fpoli Feb 15, 2018
b9fa2da
Avoid ICE in arg mistmatch error for tuple variants
estebank Feb 15, 2018
10fbdb8
save-analysis: power through bracket mis-counts
Feb 16, 2018
42df8c5
unused_unsafe: don't label irrelevant fns
ExpHP Feb 18, 2018
d5ed655
Use DefId instead of NodeId while generating debuginfo for statics.
michaelwoerister Feb 19, 2018
15ff0ad
Use DefId instead of NodeId in MonoItem::Static.
michaelwoerister Feb 19, 2018
8ff633c
Implement describe_def query for LOCAL_CRATE
michaelwoerister Feb 19, 2018
1be7f96
Rename is_translated_fn query to is_translated_item and make it suppo…
michaelwoerister Feb 19, 2018
89b3ef3
Allow for instantiating statics from upstream crates.
michaelwoerister Feb 19, 2018
1aad320
When encountering invalid token after `unsafe`, mention `{`
estebank Feb 19, 2018
713b05f
rustc_data_structures: add missing #[inline].
eddyb Feb 21, 2018
1eab1b1
support unit tests with return values that implement `Terminaton`
nikomatsakis Feb 8, 2018
0625d4c
begin crate-relative paths with `crate`
nikomatsakis Feb 11, 2018
e446f70
put the "unit test" logic into libtest
nikomatsakis Feb 14, 2018
5f1e78f
move Termination trait to std::process
nikomatsakis Feb 22, 2018
8f35141
remove tokenstream
nikomatsakis Feb 22, 2018
067c2e3
handle `#[bench]` functions better
nikomatsakis Feb 23, 2018
e0ed88d
add test for `fn main() -> !`
nikomatsakis Feb 23, 2018
a0562ec
delete this test file: it also appears as
nikomatsakis Feb 23, 2018
0a5f4ae
move test to the proper directory and test #[bench]
nikomatsakis Feb 23, 2018
068e383
update test -- we now give a slightly different error
nikomatsakis Feb 23, 2018
10f7c11
re-export `assert_test_result` for use when testing libtest itself
nikomatsakis Feb 23, 2018
380e388
do not run MIR type checker twice
nikomatsakis Feb 7, 2018
2370b60
update tests and reference files
nikomatsakis Feb 22, 2018
bcd9968
explain why we don't need to run type-checker when NLL is enabled
nikomatsakis Feb 23, 2018
25ec810
Rollup merge of #47987 - Zoxc:rm-recursion-checking, r=eddyb
Manishearth Feb 24, 2018
a79e5e2
Rollup merge of #48084 - cramertj:impl-trait-errors, r=nikomatsakis
Manishearth Feb 24, 2018
b52b33a
Rollup merge of #48143 - nikomatsakis:termination_trait_in_tests, r=e…
Manishearth Feb 24, 2018
e966993
Rollup merge of #48185 - michaelwoerister:recursive-cache-decoding, r…
Manishearth Feb 24, 2018
111af8f
Rollup merge of #48206 - michaelwoerister:colors-array, r=nikomatsakis
Manishearth Feb 24, 2018
8fdad6f
Rollup merge of #48232 - fpoli:master, r=pnkfelix
Manishearth Feb 24, 2018
387d177
Rollup merge of #48246 - estebank:ice, r=nikomatsakis
Manishearth Feb 24, 2018
b3f85fd
Rollup merge of #48258 - nrc:save-proc-nested, r=eddyb
Manishearth Feb 24, 2018
a1a1409
Rollup merge of #48317 - ExpHP:unused-unsafe-is-no-fn, r=estebank
Manishearth Feb 24, 2018
2483d84
Rollup merge of #48353 - michaelwoerister:monoitem-static-defid, r=eddyb
Manishearth Feb 24, 2018
fc7caed
Rollup merge of #48356 - estebank:unsafe-without-braces, r=nikomatsakis
Manishearth Feb 24, 2018
6ec5dc3
Rollup merge of #48402 - eddyb:y-u-no-inline, r=nikomatsakis
Manishearth Feb 24, 2018
182f882
Rollup merge of #48061 - nikomatsakis:nll-do-not-run-mir-typeck-twice…
Manishearth Feb 24, 2018
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
Next Next commit
Remove "static item recursion checking" in favor of relying on cycle …
…checks in the query engine
  • Loading branch information
Zoxc committed Feb 9, 2018
commit ae46434b7936d1f1d71cb92c45ddcf936ec0eb24
6 changes: 1 addition & 5 deletions src/librustc_driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use rustc_typeck as typeck;
use rustc_privacy;
use rustc_plugin::registry::Registry;
use rustc_plugin as plugin;
use rustc_passes::{self, ast_validation, loops, consts, static_recursion, hir_stats};
use rustc_passes::{self, ast_validation, loops, consts, hir_stats};
use rustc_const_eval::{self, check_match};
use super::Compilation;

Expand Down Expand Up @@ -972,10 +972,6 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(trans: &TransCrate,
"loop checking",
|| loops::check_crate(sess, &hir_map));

time(time_passes,
"static item recursion checking",
|| static_recursion::check_crate(sess, &hir_map))?;

let mut local_providers = ty::maps::Providers::default();
default_provide(&mut local_providers);
trans.provide(&mut local_providers);
Expand Down
16 changes: 0 additions & 16 deletions src/librustc_passes/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,6 @@ impl !Enterprise for Foo { }
Please note that negative impls are only allowed for auto traits.
"##,

E0265: r##"
This error indicates that a static or constant references itself.
All statics and constants need to resolve to a value in an acyclic manner.

For example, neither of the following can be sensibly compiled:

```compile_fail,E0265
const X: u32 = X;
```

```compile_fail,E0265
const X: u32 = Y;
const Y: u32 = X;
```
"##,

E0267: r##"
This error indicates the use of a loop keyword (`break` or `continue`) inside a
closure but outside of any loop. Erroneous code example:
Expand Down
1 change: 0 additions & 1 deletion src/librustc_passes/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ pub mod consts;
pub mod hir_stats;
pub mod loops;
mod mir_stats;
pub mod static_recursion;

#[cfg(not(stage0))] // remove after the next snapshot
__build_diagnostic_array! { librustc_passes, DIAGNOSTICS }
Expand Down
280 changes: 0 additions & 280 deletions src/librustc_passes/static_recursion.rs

This file was deleted.

4 changes: 2 additions & 2 deletions src/test/compile-fail/issue-17252.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

const FOO: usize = FOO; //~ ERROR recursive constant
const FOO: usize = FOO; //~ ERROR E0391

fn main() {
let _x: [u8; FOO]; // caused stack overflow prior to fix
let _y: usize = 1 + {
const BAR: usize = BAR; //~ ERROR recursive constant
const BAR: usize = BAR;
let _z: [u8; BAR]; // caused stack overflow prior to fix
1
};
Expand Down
13 changes: 1 addition & 12 deletions src/test/ui/issue-23302.rs → src/test/ui/issue-23302-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,7 @@
// Check that an enum with recursion in the discriminant throws
// the appropriate error (rather than, say, blowing the stack).
enum X {
A = X::A as isize, //~ ERROR E0265
A = X::A as isize, //~ ERROR E0391
}

// Since `Y::B` here defaults to `Y::A+1`, this is also a
// recursive definition.
enum Y {
A = Y::B as isize, //~ ERROR E0265
B,
}

const A: i32 = B; //~ ERROR E0265

const B: i32 = A; //~ ERROR E0265

fn main() { }
15 changes: 15 additions & 0 deletions src/test/ui/issue-23302-1.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error[E0391]: unsupported cyclic reference between types/traits detected
--> $DIR/issue-23302-1.rs:14:9
|
14 | A = X::A as isize, //~ ERROR E0391
| ^^^^^^^^^^^^^ cyclic reference
|
note: the cycle begins when const-evaluating `X::A::{{initializer}}`...
--> $DIR/issue-23302-1.rs:14:5
|
14 | A = X::A as isize, //~ ERROR E0391
| ^^^^^^^^^^^^^^^^^
= note: ...which then again requires const-evaluating `X::A::{{initializer}}`, completing the cycle.

error: aborting due to previous error

Loading