Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustc_resolve: use
continue
instead of return
to "exit" a loop it…
…eration.
- Loading branch information
Showing
6 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/test/ui/rust-2018/uniform-paths-forward-compat/issue-54253.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// edition:2018 | ||
|
||
// Dummy import to introduce `uniform_paths` canaries. | ||
use std; | ||
|
||
// fn version() -> &'static str {""} | ||
|
||
mod foo { | ||
// Error wasn't reported, despite `version` being commented out above. | ||
use crate::version; //~ ERROR unresolved import `crate::version` | ||
|
||
fn bar() { | ||
version(); | ||
} | ||
} | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
src/test/ui/rust-2018/uniform-paths-forward-compat/issue-54253.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0432]: unresolved import `crate::version` | ||
--> $DIR/issue-54253.rs:20:9 | ||
| | ||
LL | use crate::version; //~ ERROR unresolved import `crate::version` | ||
| ^^^^^^^^^^^^^^ no `version` in the root | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0432`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// edition:2018 | ||
|
||
#![feature(uniform_paths)] | ||
|
||
// Dummy import to introduce `uniform_paths` canaries. | ||
use std; | ||
|
||
// fn version() -> &'static str {""} | ||
|
||
mod foo { | ||
// Error wasn't reported, despite `version` being commented out above. | ||
use crate::version; //~ ERROR unresolved import `crate::version` | ||
|
||
fn bar() { | ||
version(); | ||
} | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error[E0432]: unresolved import `crate::version` | ||
--> $DIR/issue-54253.rs:22:9 | ||
| | ||
LL | use crate::version; //~ ERROR unresolved import `crate::version` | ||
| ^^^^^^^^^^^^^^ no `version` in the root | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0432`. |