diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-08 23:31:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-08 23:31:19 +0200 |
| commit | fc068222d06ac3ff656c4c9ef2b98428c1c4537b (patch) | |
| tree | 549c8b1517f37a1fb2c80cd8786404a5bad1d6bb /src/test/ui/include-single-expr.rs | |
| parent | 2748a9fd93dd1a00a4521f4f16de5befbf77f6cd (diff) | |
| parent | e068cec13e2a63dba29d40f0130527d980f83f7c (diff) | |
Rollup merge of #64284 - Mark-Simulacrum:include-warn, r=petrochenkov
Warn if include macro fails to include entire file This currently introduces an error, mainly because that was just simpler, and I'm not entirely certain if we can introduce a lint without an RFC and such. This is primarily to get feedback on the approach and overall aim -- in particular, do we think this is helpful? If so, we probably will need lang-team sign off and decide if it should be an error (as currently introduced by this PR), a lint, or a warning. r? @petrochenkov cc https://github.com/rust-lang/rust/issues/35560
Diffstat (limited to 'src/test/ui/include-single-expr.rs')
| -rw-r--r-- | src/test/ui/include-single-expr.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/include-single-expr.rs b/src/test/ui/include-single-expr.rs new file mode 100644 index 00000000000..0f4c29ec014 --- /dev/null +++ b/src/test/ui/include-single-expr.rs @@ -0,0 +1,6 @@ +// error-pattern include macro expected single expression + +fn main() { + include!("include-single-expr-helper.rs"); + include!("include-single-expr-helper-1.rs"); +} |
