forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#115304 - Enselic:trailing-gt, r=cjgillot
Allow file names to end with '>' The [`rustc_span::FileName`](https://doc.rust-lang.org/stable/nightly-rustc/rustc_span/enum.FileName.html) enum already differentiates between real files and "fake" files such as `<anon>`. We do not need to artificially forbid real file names from ending in `>`. Closes rust-lang#73419
- Loading branch information
Showing
4 changed files
with
27 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include ../tools.mk | ||
|
||
# We are creating files with forbidden characters in their names, so we need to | ||
# ignore-windows | ||
|
||
ifdef RUSTC_BLESS_TEST | ||
RUSTC_TEST_OP = cp | ||
else | ||
RUSTC_TEST_OP = $(DIFF) | ||
endif | ||
|
||
all: | ||
echo '"comes from a file with a name that begins with <"' > "$(TMPDIR)/<leading-lt" | ||
echo '"comes from a file with a name that ends with >"' > "$(TMPDIR)/trailing-gt>" | ||
cp silly-file-names.rs "$(TMPDIR)/silly-file-names.rs" | ||
$(RUSTC) "$(TMPDIR)/silly-file-names.rs" -o "$(TMPDIR)/silly-file-names" | ||
"$(TMPDIR)/silly-file-names" > "$(TMPDIR)/silly-file-names.run.stdout" | ||
$(RUSTC_TEST_OP) "$(TMPDIR)/silly-file-names.run.stdout" silly-file-names.run.stdout |
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,7 @@ | ||
// run-pass | ||
// check-run-results | ||
|
||
fn main() { | ||
println!(include!("<leading-lt")); | ||
println!(include!("trailing-gt>")); | ||
} |
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,2 @@ | ||
comes from a file with a name that begins with < | ||
comes from a file with a name that ends with > |