Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
d6ea6b97
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d6ea6b97
编写于
5月 31, 2019
作者:
E
Esteban Küber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix tidy
上级
860dce79
变更
69
隐藏空白更改
内联
并排
Showing
69 changed file
with
138 addition
and
210 deletion
+138
-210
src/test/ui/fmt/format-string-error-2.rs
src/test/ui/fmt/format-string-error-2.rs
+0
-1
src/test/ui/fmt/format-string-error-2.stderr
src/test/ui/fmt/format-string-error-2.stderr
+18
-18
src/test/ui/issues/issue-28433.rs
src/test/ui/issues/issue-28433.rs
+0
-2
src/test/ui/issues/issue-28433.stderr
src/test/ui/issues/issue-28433.stderr
+2
-2
src/test/ui/issues/issue-36638.rs
src/test/ui/issues/issue-36638.rs
+0
-2
src/test/ui/issues/issue-36638.stderr
src/test/ui/issues/issue-36638.stderr
+3
-3
src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs
.../ui/parser/associated-types-project-from-hrtb-explicit.rs
+0
-2
src/test/ui/parser/associated-types-project-from-hrtb-explicit.stderr
...parser/associated-types-project-from-hrtb-explicit.stderr
+2
-2
src/test/ui/parser/bad-lit-suffixes.rs
src/test/ui/parser/bad-lit-suffixes.rs
+0
-3
src/test/ui/parser/bad-lit-suffixes.stderr
src/test/ui/parser/bad-lit-suffixes.stderr
+16
-16
src/test/ui/parser/doc-after-struct-field.rs
src/test/ui/parser/doc-after-struct-field.rs
+0
-2
src/test/ui/parser/doc-after-struct-field.stderr
src/test/ui/parser/doc-after-struct-field.stderr
+2
-2
src/test/ui/parser/doc-before-fn-rbrace.rs
src/test/ui/parser/doc-before-fn-rbrace.rs
+0
-2
src/test/ui/parser/doc-before-fn-rbrace.stderr
src/test/ui/parser/doc-before-fn-rbrace.stderr
+1
-1
src/test/ui/parser/doc-before-identifier.rs
src/test/ui/parser/doc-before-identifier.rs
+0
-2
src/test/ui/parser/doc-before-identifier.stderr
src/test/ui/parser/doc-before-identifier.stderr
+1
-1
src/test/ui/parser/doc-before-mod-rbrace.rs
src/test/ui/parser/doc-before-mod-rbrace.rs
+0
-2
src/test/ui/parser/doc-before-mod-rbrace.stderr
src/test/ui/parser/doc-before-mod-rbrace.stderr
+1
-1
src/test/ui/parser/doc-before-struct-rbrace-1.rs
src/test/ui/parser/doc-before-struct-rbrace-1.rs
+0
-2
src/test/ui/parser/doc-before-struct-rbrace-1.stderr
src/test/ui/parser/doc-before-struct-rbrace-1.stderr
+1
-1
src/test/ui/parser/doc-before-struct-rbrace-2.rs
src/test/ui/parser/doc-before-struct-rbrace-2.rs
+0
-2
src/test/ui/parser/doc-before-struct-rbrace-2.stderr
src/test/ui/parser/doc-before-struct-rbrace-2.stderr
+1
-1
src/test/ui/parser/issue-17904-2.rs
src/test/ui/parser/issue-17904-2.rs
+0
-2
src/test/ui/parser/issue-17904-2.stderr
src/test/ui/parser/issue-17904-2.stderr
+1
-1
src/test/ui/parser/issue-17904.rs
src/test/ui/parser/issue-17904.rs
+0
-2
src/test/ui/parser/issue-17904.stderr
src/test/ui/parser/issue-17904.stderr
+1
-1
src/test/ui/parser/issue-32214.rs
src/test/ui/parser/issue-32214.rs
+0
-2
src/test/ui/parser/issue-32214.stderr
src/test/ui/parser/issue-32214.stderr
+1
-1
src/test/ui/parser/issue-32505.rs
src/test/ui/parser/issue-32505.rs
+0
-2
src/test/ui/parser/issue-32505.stderr
src/test/ui/parser/issue-32505.stderr
+1
-1
src/test/ui/parser/lex-bad-binary-literal.rs
src/test/ui/parser/lex-bad-binary-literal.rs
+0
-2
src/test/ui/parser/lex-bad-binary-literal.stderr
src/test/ui/parser/lex-bad-binary-literal.stderr
+9
-9
src/test/ui/parser/lex-bad-numeric-literals.rs
src/test/ui/parser/lex-bad-numeric-literals.rs
+0
-2
src/test/ui/parser/lex-bad-numeric-literals.stderr
src/test/ui/parser/lex-bad-numeric-literals.stderr
+23
-23
src/test/ui/parser/lex-bad-octal-literal.rs
src/test/ui/parser/lex-bad-octal-literal.rs
+0
-2
src/test/ui/parser/lex-bad-octal-literal.stderr
src/test/ui/parser/lex-bad-octal-literal.stderr
+2
-2
src/test/ui/parser/macro/macro-incomplete-parse.rs
src/test/ui/parser/macro/macro-incomplete-parse.rs
+0
-2
src/test/ui/parser/macro/macro-incomplete-parse.stderr
src/test/ui/parser/macro/macro-incomplete-parse.stderr
+3
-3
src/test/ui/parser/new-unicode-escapes-4.rs
src/test/ui/parser/new-unicode-escapes-4.rs
+0
-2
src/test/ui/parser/new-unicode-escapes-4.stderr
src/test/ui/parser/new-unicode-escapes-4.stderr
+1
-1
src/test/ui/parser/no-unsafe-self.rs
src/test/ui/parser/no-unsafe-self.rs
+0
-2
src/test/ui/parser/no-unsafe-self.stderr
src/test/ui/parser/no-unsafe-self.stderr
+6
-6
src/test/ui/parser/range_inclusive_dotdotdot.rs
src/test/ui/parser/range_inclusive_dotdotdot.rs
+0
-2
src/test/ui/parser/range_inclusive_dotdotdot.stderr
src/test/ui/parser/range_inclusive_dotdotdot.stderr
+4
-4
src/test/ui/parser/raw-byte-string-literals.rs
src/test/ui/parser/raw-byte-string-literals.rs
+0
-3
src/test/ui/parser/raw-byte-string-literals.stderr
src/test/ui/parser/raw-byte-string-literals.stderr
+2
-2
src/test/ui/parser/recover-enum.rs
src/test/ui/parser/recover-enum.rs
+0
-2
src/test/ui/parser/recover-enum.stderr
src/test/ui/parser/recover-enum.stderr
+3
-3
src/test/ui/parser/recover-enum2.rs
src/test/ui/parser/recover-enum2.rs
+0
-2
src/test/ui/parser/recover-enum2.stderr
src/test/ui/parser/recover-enum2.stderr
+2
-2
src/test/ui/parser/recover-struct.rs
src/test/ui/parser/recover-struct.rs
+0
-2
src/test/ui/parser/recover-struct.stderr
src/test/ui/parser/recover-struct.stderr
+1
-1
src/test/ui/parser/removed-syntax-field-let.rs
src/test/ui/parser/removed-syntax-field-let.rs
+0
-2
src/test/ui/parser/removed-syntax-field-let.stderr
src/test/ui/parser/removed-syntax-field-let.stderr
+2
-2
src/test/ui/parser/trailing-plus-in-bounds.rs
src/test/ui/parser/trailing-plus-in-bounds.rs
+0
-1
src/test/ui/parser/trait-bounds-not-on-impl.rs
src/test/ui/parser/trait-bounds-not-on-impl.rs
+2
-6
src/test/ui/parser/trait-bounds-not-on-impl.stderr
src/test/ui/parser/trait-bounds-not-on-impl.stderr
+2
-2
src/test/ui/parser/trait-object-bad-parens.rs
src/test/ui/parser/trait-object-bad-parens.rs
+0
-2
src/test/ui/parser/trait-object-bad-parens.stderr
src/test/ui/parser/trait-object-bad-parens.stderr
+4
-4
src/test/ui/parser/trait-object-lifetime-parens.rs
src/test/ui/parser/trait-object-lifetime-parens.rs
+0
-2
src/test/ui/parser/trait-object-lifetime-parens.stderr
src/test/ui/parser/trait-object-lifetime-parens.stderr
+5
-5
src/test/ui/parser/use-as-where-use-ends-with-mod-sep.rs
src/test/ui/parser/use-as-where-use-ends-with-mod-sep.rs
+0
-2
src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr
src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr
+2
-2
src/test/ui/parser/where-clauses-no-bounds-or-predicates.rs
src/test/ui/parser/where-clauses-no-bounds-or-predicates.rs
+0
-2
src/test/ui/parser/where-clauses-no-bounds-or-predicates.stderr
...st/ui/parser/where-clauses-no-bounds-or-predicates.stderr
+1
-1
src/test/ui/self/self_type_keyword.rs
src/test/ui/self/self_type_keyword.rs
+0
-2
src/test/ui/self/self_type_keyword.stderr
src/test/ui/self/self_type_keyword.stderr
+11
-11
src/test/ui/traits/trait-object-vs-lifetime-2.rs
src/test/ui/traits/trait-object-vs-lifetime-2.rs
+0
-2
src/test/ui/traits/trait-object-vs-lifetime-2.stderr
src/test/ui/traits/trait-object-vs-lifetime-2.stderr
+1
-1
未找到文件。
src/test/ui/fmt/format-string-error-2.rs
浏览文件 @
d6ea6b97
// ignore-tidy-tab
fn
main
()
{
...
...
src/test/ui/fmt/format-string-error-2.stderr
浏览文件 @
d6ea6b97
error: incorrect unicode escape sequence
--> $DIR/format-string-error-2.rs:7
8
:20
--> $DIR/format-string-error-2.rs:7
7
:20
|
LL | println!("\x7B}\u8 {", 1);
| ^^-
...
...
@@ -7,7 +7,7 @@ LL | println!("\x7B}\u8 {", 1);
| help: format of unicode escape sequences uses braces: `\u{8}`
error: invalid format string: expected `'}'`, found `'a'`
--> $DIR/format-string-error-2.rs:
6
:5
--> $DIR/format-string-error-2.rs:
5
:5
|
LL | format!("{
| - because of this opening brace
...
...
@@ -17,7 +17,7 @@ LL | a");
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'b'`
--> $DIR/format-string-error-2.rs:
10
:5
--> $DIR/format-string-error-2.rs:
9
:5
|
LL | format!("{ \
| - because of this opening brace
...
...
@@ -28,7 +28,7 @@ LL | b");
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:1
2
:18
--> $DIR/format-string-error-2.rs:1
1
:18
|
LL | format!(r#"{ \
| - ^ expected `}` in format string
...
...
@@ -38,7 +38,7 @@ LL | format!(r#"{ \
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:1
6
:18
--> $DIR/format-string-error-2.rs:1
5
:18
|
LL | format!(r#"{ \n
| - ^ expected `}` in format string
...
...
@@ -48,7 +48,7 @@ LL | format!(r#"{ \n
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'e'`
--> $DIR/format-string-error-2.rs:2
2
:5
--> $DIR/format-string-error-2.rs:2
1
:5
|
LL | format!("{ \n
| - because of this opening brace
...
...
@@ -59,7 +59,7 @@ LL | e");
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'a'`
--> $DIR/format-string-error-2.rs:2
6
:5
--> $DIR/format-string-error-2.rs:2
5
:5
|
LL | {
| - because of this opening brace
...
...
@@ -69,7 +69,7 @@ LL | a");
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'a'`
--> $DIR/format-string-error-2.rs:
30
:5
--> $DIR/format-string-error-2.rs:
29
:5
|
LL | {
| - because of this opening brace
...
...
@@ -79,7 +79,7 @@ LL | a
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'b'`
--> $DIR/format-string-error-2.rs:3
6
:5
--> $DIR/format-string-error-2.rs:3
5
:5
|
LL | { \
| - because of this opening brace
...
...
@@ -90,7 +90,7 @@ LL | b");
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'b'`
--> $DIR/format-string-error-2.rs:4
1
:5
--> $DIR/format-string-error-2.rs:4
0
:5
|
LL | { \
| - because of this opening brace
...
...
@@ -101,7 +101,7 @@ LL | b \
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:4
6
:8
--> $DIR/format-string-error-2.rs:4
5
:8
|
LL | raw { \
| - ^ expected `}` in format string
...
...
@@ -111,7 +111,7 @@ LL | raw { \
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'\'`
--> $DIR/format-string-error-2.rs:5
1
:8
--> $DIR/format-string-error-2.rs:5
0
:8
|
LL | raw { \n
| - ^ expected `}` in format string
...
...
@@ -121,7 +121,7 @@ LL | raw { \n
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'e'`
--> $DIR/format-string-error-2.rs:5
8
:5
--> $DIR/format-string-error-2.rs:5
7
:5
|
LL | { \n
| - because of this opening brace
...
...
@@ -132,7 +132,7 @@ LL | e");
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: expected `'}'`, found `'a'`
--> $DIR/format-string-error-2.rs:6
8
:5
--> $DIR/format-string-error-2.rs:6
7
:5
|
LL | {
| - because of this opening brace
...
...
@@ -142,13 +142,13 @@ LL | asdf}
= note: if you intended to print `{`, you can escape it using `{{`
error: 1 positional argument in format string, but no arguments were given
--> $DIR/format-string-error-2.rs:7
1
:17
--> $DIR/format-string-error-2.rs:7
0
:17
|
LL | println!("\t{}");
| ^^
error: invalid format string: expected `'}'` but string was terminated
--> $DIR/format-string-error-2.rs:7
5
:27
--> $DIR/format-string-error-2.rs:7
4
:27
|
LL | println!("\x7B}\u{8} {", 1);
| -^ expected `'}'` in format string
...
...
@@ -158,7 +158,7 @@ LL | println!("\x7B}\u{8} {", 1);
= note: if you intended to print `{`, you can escape it using `{{`
error: invalid format string: unmatched `}` found
--> $DIR/format-string-error-2.rs:8
2
:21
--> $DIR/format-string-error-2.rs:8
1
:21
|
LL | println!(r#"\x7B}\u{8} {"#, 1);
| ^ unmatched `}` in format string
...
...
@@ -166,7 +166,7 @@ LL | println!(r#"\x7B}\u{8} {"#, 1);
= note: if you intended to print `}`, you can escape it using `}}`
error: invalid format string: unmatched `}` found
--> $DIR/format-string-error-2.rs:8
5
:21
--> $DIR/format-string-error-2.rs:8
4
:21
|
LL | println!(r#"\x7B}\u8 {"#, 1);
| ^ unmatched `}` in format string
...
...
src/test/ui/issues/issue-28433.rs
浏览文件 @
d6ea6b97
enum
Bird
{
pub
Duck
,
//~^ ERROR unnecessary visibility qualifier
...
...
src/test/ui/issues/issue-28433.stderr
浏览文件 @
d6ea6b97
error: unnecessary visibility qualifier
--> $DIR/issue-28433.rs:
4
:5
--> $DIR/issue-28433.rs:
2
:5
|
LL | pub Duck,
| ^^^ `pub` not permitted here
error: unnecessary visibility qualifier
--> $DIR/issue-28433.rs:
7
:5
--> $DIR/issue-28433.rs:
5
:5
|
LL | pub(crate) Dove
| ^^^^^^^^^^ `pub` not permitted here
...
...
src/test/ui/issues/issue-36638.rs
浏览文件 @
d6ea6b97
struct
Foo
<
Self
>
(
Self
);
//~^ ERROR expected identifier, found keyword `Self`
//~^^ ERROR E0392
...
...
src/test/ui/issues/issue-36638.stderr
浏览文件 @
d6ea6b97
error: expected identifier, found keyword `Self`
--> $DIR/issue-36638.rs:
3
:12
--> $DIR/issue-36638.rs:
1
:12
|
LL | struct Foo<Self>(Self);
| ^^^^ expected identifier, found keyword
error: expected identifier, found keyword `Self`
--> $DIR/issue-36638.rs:
7
:11
--> $DIR/issue-36638.rs:
5
:11
|
LL | trait Bar<Self> {}
| ^^^^ expected identifier, found keyword
error[E0392]: parameter `Self` is never used
--> $DIR/issue-36638.rs:
3
:12
--> $DIR/issue-36638.rs:
1
:12
|
LL | struct Foo<Self>(Self);
| ^^^^ unused parameter
...
...
src/test/ui/parser/associated-types-project-from-hrtb-explicit.rs
浏览文件 @
d6ea6b97
// Test you can't use a higher-ranked trait bound inside of a qualified
// path (just won't parse).
...
...
src/test/ui/parser/associated-types-project-from-hrtb-explicit.stderr
浏览文件 @
d6ea6b97
error: expected identifier, found keyword `for`
--> $DIR/associated-types-project-from-hrtb-explicit.rs:1
2
:21
--> $DIR/associated-types-project-from-hrtb-explicit.rs:1
0
:21
|
LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
| ^^^ expected identifier, found keyword
...
...
@@ -9,7 +9,7 @@ LL | fn foo2<I>(x: <I as r#for<'x> Foo<&'x isize>>::A)
| ^^^^^
error: expected one of `::` or `>`, found `Foo`
--> $DIR/associated-types-project-from-hrtb-explicit.rs:1
2
:29
--> $DIR/associated-types-project-from-hrtb-explicit.rs:1
0
:29
|
LL | fn foo2<I>(x: <I as for<'x> Foo<&'x isize>>::A)
| ^^^ expected one of `::` or `>` here
...
...
src/test/ui/parser/bad-lit-suffixes.rs
浏览文件 @
d6ea6b97
extern
"C"
suffix
//~ ERROR suffixes on an ABI spec are invalid
fn
foo
()
{}
...
...
src/test/ui/parser/bad-lit-suffixes.stderr
浏览文件 @
d6ea6b97
error: suffixes on an ABI spec are invalid
--> $DIR/bad-lit-suffixes.rs:
5
:5
--> $DIR/bad-lit-suffixes.rs:
2
:5
|
LL | "C"suffix
| ^^^^^^^^^ invalid suffix `suffix`
error: suffixes on an ABI spec are invalid
--> $DIR/bad-lit-suffixes.rs:
9
:5
--> $DIR/bad-lit-suffixes.rs:
6
:5
|
LL | "C"suffix
| ^^^^^^^^^ invalid suffix `suffix`
error: suffixes on a string literal are invalid
--> $DIR/bad-lit-suffixes.rs:1
3
:5
--> $DIR/bad-lit-suffixes.rs:1
0
:5
|
LL | ""suffix;
| ^^^^^^^^ invalid suffix `suffix`
error: suffixes on a byte string literal are invalid
--> $DIR/bad-lit-suffixes.rs:1
4
:5
--> $DIR/bad-lit-suffixes.rs:1
1
:5
|
LL | b""suffix;
| ^^^^^^^^^ invalid suffix `suffix`
error: suffixes on a string literal are invalid
--> $DIR/bad-lit-suffixes.rs:1
5
:5
--> $DIR/bad-lit-suffixes.rs:1
2
:5
|
LL | r#""#suffix;
| ^^^^^^^^^^^ invalid suffix `suffix`
error: suffixes on a byte string literal are invalid
--> $DIR/bad-lit-suffixes.rs:1
6
:5
--> $DIR/bad-lit-suffixes.rs:1
3
:5
|
LL | br#""#suffix;
| ^^^^^^^^^^^^ invalid suffix `suffix`
error: suffixes on a char literal are invalid
--> $DIR/bad-lit-suffixes.rs:1
7
:5
--> $DIR/bad-lit-suffixes.rs:1
4
:5
|
LL | 'a'suffix;
| ^^^^^^^^^ invalid suffix `suffix`
error: suffixes on a byte literal are invalid
--> $DIR/bad-lit-suffixes.rs:1
8
:5
--> $DIR/bad-lit-suffixes.rs:1
5
:5
|
LL | b'a'suffix;
| ^^^^^^^^^^ invalid suffix `suffix`
error: invalid width `1024` for integer literal
--> $DIR/bad-lit-suffixes.rs:
20
:5
--> $DIR/bad-lit-suffixes.rs:
17
:5
|
LL | 1234u1024;
| ^^^^^^^^^
...
...
@@ -55,7 +55,7 @@ LL | 1234u1024;
= help: valid widths are 8, 16, 32, 64 and 128
error: invalid width `1024` for integer literal
--> $DIR/bad-lit-suffixes.rs:
21
:5
--> $DIR/bad-lit-suffixes.rs:
18
:5
|
LL | 1234i1024;
| ^^^^^^^^^
...
...
@@ -63,7 +63,7 @@ LL | 1234i1024;
= help: valid widths are 8, 16, 32, 64 and 128
error: invalid width `1024` for float literal
--> $DIR/bad-lit-suffixes.rs:
22
:5
--> $DIR/bad-lit-suffixes.rs:
19
:5
|
LL | 1234f1024;
| ^^^^^^^^^
...
...
@@ -71,7 +71,7 @@ LL | 1234f1024;
= help: valid widths are 32 and 64
error: invalid width `1024` for float literal
--> $DIR/bad-lit-suffixes.rs:2
3
:5
--> $DIR/bad-lit-suffixes.rs:2
0
:5
|
LL | 1234.5f1024;
| ^^^^^^^^^^^
...
...
@@ -79,7 +79,7 @@ LL | 1234.5f1024;
= help: valid widths are 32 and 64
error: invalid suffix `suffix` for integer literal
--> $DIR/bad-lit-suffixes.rs:2
5
:5
--> $DIR/bad-lit-suffixes.rs:2
2
:5
|
LL | 1234suffix;
| ^^^^^^^^^^ invalid suffix `suffix`
...
...
@@ -87,7 +87,7 @@ LL | 1234suffix;
= help: the suffix must be one of the integral types (`u32`, `isize`, etc)
error: invalid suffix `suffix` for integer literal
--> $DIR/bad-lit-suffixes.rs:2
6
:5
--> $DIR/bad-lit-suffixes.rs:2
3
:5
|
LL | 0b101suffix;
| ^^^^^^^^^^^ invalid suffix `suffix`
...
...
@@ -95,7 +95,7 @@ LL | 0b101suffix;
= help: the suffix must be one of the integral types (`u32`, `isize`, etc)
error: invalid suffix `suffix` for float literal
--> $DIR/bad-lit-suffixes.rs:2
7
:5
--> $DIR/bad-lit-suffixes.rs:2
4
:5
|
LL | 1.0suffix;
| ^^^^^^^^^ invalid suffix `suffix`
...
...
@@ -103,7 +103,7 @@ LL | 1.0suffix;
= help: valid suffixes are `f32` and `f64`
error: invalid suffix `suffix` for float literal
--> $DIR/bad-lit-suffixes.rs:2
8
:5
--> $DIR/bad-lit-suffixes.rs:2
5
:5
|
LL | 1.0e10suffix;
| ^^^^^^^^^^^^ invalid suffix `suffix`
...
...
src/test/ui/parser/doc-after-struct-field.rs
浏览文件 @
d6ea6b97
struct
X
{
a
:
u8
/** document a */
,
//~^ ERROR found a documentation comment that doesn't document anything
...
...
src/test/ui/parser/doc-after-struct-field.stderr
浏览文件 @
d6ea6b97
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-after-struct-field.rs:
4
:11
--> $DIR/doc-after-struct-field.rs:
2
:11
|
LL | a: u8 /** document a */,
| ^^^^^^^^^^^^^^^^^
...
...
@@ -7,7 +7,7 @@ LL | a: u8 /** document a */,
= help: doc comments must come before what they document, maybe a comment was intended with `//`?
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-after-struct-field.rs:
10
:11
--> $DIR/doc-after-struct-field.rs:
8
:11
|
LL | a: u8 /// document a
| ^^^^^^^^^^^^^^
...
...
src/test/ui/parser/doc-before-fn-rbrace.rs
浏览文件 @
d6ea6b97
fn
main
()
{
/// document
//~^ ERROR found a documentation comment that doesn't document anything
...
...
src/test/ui/parser/doc-before-fn-rbrace.stderr
浏览文件 @
d6ea6b97
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-before-fn-rbrace.rs:
4
:5
--> $DIR/doc-before-fn-rbrace.rs:
2
:5
|
LL | /// document
| ^^^^^^^^^^^^
...
...
src/test/ui/parser/doc-before-identifier.rs
浏览文件 @
d6ea6b97
fn
/// document
foo
()
{}
//~^^ ERROR expected identifier, found doc comment `/// document`
...
...
src/test/ui/parser/doc-before-identifier.stderr
浏览文件 @
d6ea6b97
error: expected identifier, found doc comment `/// document`
--> $DIR/doc-before-identifier.rs:
3
:4
--> $DIR/doc-before-identifier.rs:
1
:4
|
LL | fn /// document
| ^^^^^^^^^^^^ expected identifier, found doc comment
...
...
src/test/ui/parser/doc-before-mod-rbrace.rs
浏览文件 @
d6ea6b97
mod
Foo
{
/// document
//~^ ERROR expected item after doc comment
...
...
src/test/ui/parser/doc-before-mod-rbrace.stderr
浏览文件 @
d6ea6b97
error: expected item after doc comment
--> $DIR/doc-before-mod-rbrace.rs:
4
:5
--> $DIR/doc-before-mod-rbrace.rs:
2
:5
|
LL | /// document
| ^^^^^^^^^^^^ this doc comment doesn't document anything
...
...
src/test/ui/parser/doc-before-struct-rbrace-1.rs
浏览文件 @
d6ea6b97
struct
X
{
a
:
u8
,
/// document
...
...
src/test/ui/parser/doc-before-struct-rbrace-1.stderr
浏览文件 @
d6ea6b97
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-before-struct-rbrace-1.rs:
5
:5
--> $DIR/doc-before-struct-rbrace-1.rs:
3
:5
|
LL | /// document
| ^^^^^^^^^^^^
...
...
src/test/ui/parser/doc-before-struct-rbrace-2.rs
浏览文件 @
d6ea6b97
struct
X
{
a
:
u8
/// document
//~^ ERROR found a documentation comment that doesn't document anything
...
...
src/test/ui/parser/doc-before-struct-rbrace-2.stderr
浏览文件 @
d6ea6b97
error[E0585]: found a documentation comment that doesn't document anything
--> $DIR/doc-before-struct-rbrace-2.rs:
4
:11
--> $DIR/doc-before-struct-rbrace-2.rs:
2
:11
|
LL | a: u8 /// document
| ^^^^^^^^^^^^
...
...
src/test/ui/parser/issue-17904-2.rs
浏览文件 @
d6ea6b97
struct
Bar
<
T
>
{
x
:
T
}
where
T
:
Copy
//~ ERROR expected item, found keyword `where`
fn
main
()
{}
src/test/ui/parser/issue-17904-2.stderr
浏览文件 @
d6ea6b97
error: expected item, found keyword `where`
--> $DIR/issue-17904-2.rs:
3
:24
--> $DIR/issue-17904-2.rs:
1
:24
|
LL | struct Bar<T> { x: T } where T: Copy
| ^^^^^ expected item
...
...
src/test/ui/parser/issue-17904.rs
浏览文件 @
d6ea6b97
struct
Baz
<
U
>
where
U
:
Eq
(
U
);
//This is parsed as the new Fn* style parenthesis syntax.
struct
Baz
<
U
>
where
U
:
Eq
(
U
)
->
R
;
// Notice this parses as well.
struct
Baz
<
U
>
(
U
)
where
U
:
Eq
;
// This rightfully signals no error as well.
...
...
src/test/ui/parser/issue-17904.stderr
浏览文件 @
d6ea6b97
error: expected one of `:`, `==`, or `=`, found `;`
--> $DIR/issue-17904.rs:
6
:33
--> $DIR/issue-17904.rs:
4
:33
|
LL | struct Foo<T> where T: Copy, (T);
| ^ expected one of `:`, `==`, or `=` here
...
...
src/test/ui/parser/issue-32214.rs
浏览文件 @
d6ea6b97
trait
Trait
<
T
>
{
type
Item
;
}
pub
fn
test
<
W
,
I
:
Trait
<
Item
=
(),
W
>
>
()
{}
...
...
src/test/ui/parser/issue-32214.stderr
浏览文件 @
d6ea6b97
error: associated type bindings must be declared after generic parameters
--> $DIR/issue-32214.rs:
5
:25
--> $DIR/issue-32214.rs:
3
:25
|
LL | pub fn test<W, I: Trait<Item=(), W> >() {}
| -------^^^
...
...
src/test/ui/parser/issue-32505.rs
浏览文件 @
d6ea6b97
pub
fn
test
()
{
foo
(|
_
|)
//~ ERROR expected expression, found `)`
}
...
...
src/test/ui/parser/issue-32505.stderr
浏览文件 @
d6ea6b97
error: expected expression, found `)`
--> $DIR/issue-32505.rs:
4
:12
--> $DIR/issue-32505.rs:
2
:12
|
LL | foo(|_|)
| ^ expected expression
...
...
src/test/ui/parser/lex-bad-binary-literal.rs
浏览文件 @
d6ea6b97
fn
main
()
{
0b121
;
//~ ERROR invalid digit for a base 2 literal
0b10_10301
;
//~ ERROR invalid digit for a base 2 literal
...
...
src/test/ui/parser/lex-bad-binary-literal.stderr
浏览文件 @
d6ea6b97
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:
4
:8
--> $DIR/lex-bad-binary-literal.rs:
2
:8
|
LL | 0b121;
| ^
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:
5
:12
--> $DIR/lex-bad-binary-literal.rs:
3
:12
|
LL | 0b10_10301;
| ^
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:
6
:7
--> $DIR/lex-bad-binary-literal.rs:
4
:7
|
LL | 0b30;
| ^
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:
7
:7
--> $DIR/lex-bad-binary-literal.rs:
5
:7
|
LL | 0b41;
| ^
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:
8
:7
--> $DIR/lex-bad-binary-literal.rs:
6
:7
|
LL | 0b5;
| ^
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:
9
:7
--> $DIR/lex-bad-binary-literal.rs:
7
:7
|
LL | 0b6;
| ^
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:
10
:7
--> $DIR/lex-bad-binary-literal.rs:
8
:7
|
LL | 0b7;
| ^
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:
11
:7
--> $DIR/lex-bad-binary-literal.rs:
9
:7
|
LL | 0b8;
| ^
error: invalid digit for a base 2 literal
--> $DIR/lex-bad-binary-literal.rs:1
2
:7
--> $DIR/lex-bad-binary-literal.rs:1
0
:7
|
LL | 0b9;
| ^
...
...
src/test/ui/parser/lex-bad-numeric-literals.rs
浏览文件 @
d6ea6b97
fn
main
()
{
0o1
.0
;
//~ ERROR: octal float literal is not supported
0o2
f32
;
//~ ERROR: octal float literal is not supported
...
...
src/test/ui/parser/lex-bad-numeric-literals.stderr
浏览文件 @
d6ea6b97
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:
4
:5
--> $DIR/lex-bad-numeric-literals.rs:
2
:5
|
LL | 0o1.0;
| ^^^^^
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:
6
:5
--> $DIR/lex-bad-numeric-literals.rs:
4
:5
|
LL | 0o3.0f32;
| ^^^^^
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:
7
:5
--> $DIR/lex-bad-numeric-literals.rs:
5
:5
|
LL | 0o4e4;
| ^^^^^
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:
8
:5
--> $DIR/lex-bad-numeric-literals.rs:
6
:5
|
LL | 0o5.0e5;
| ^^^^^^^
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:
9
:5
--> $DIR/lex-bad-numeric-literals.rs:
7
:5
|
LL | 0o6e6f32;
| ^^^^^
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:
10
:5
--> $DIR/lex-bad-numeric-literals.rs:
8
:5
|
LL | 0o7.0e7f64;
| ^^^^^^^
error: hexadecimal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:
11
:5
--> $DIR/lex-bad-numeric-literals.rs:
9
:5
|
LL | 0x8.0e+9;
| ^^^^^^^^
error: hexadecimal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:1
2
:5
--> $DIR/lex-bad-numeric-literals.rs:1
0
:5
|
LL | 0x9.0e-9;
| ^^^^^^^^
error: no valid digits found for number
--> $DIR/lex-bad-numeric-literals.rs:1
3
:5
--> $DIR/lex-bad-numeric-literals.rs:1
1
:5
|
LL | 0o;
| ^^
error: expected at least one digit in exponent
--> $DIR/lex-bad-numeric-literals.rs:1
4
:8
--> $DIR/lex-bad-numeric-literals.rs:1
2
:8
|
LL | 1e+;
| ^
error: hexadecimal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:1
5
:5
--> $DIR/lex-bad-numeric-literals.rs:1
3
:5
|
LL | 0x539.0;
| ^^^^^^^
error: no valid digits found for number
--> $DIR/lex-bad-numeric-literals.rs:
20
:5
--> $DIR/lex-bad-numeric-literals.rs:
18
:5
|
LL | 0x;
| ^^
error: no valid digits found for number
--> $DIR/lex-bad-numeric-literals.rs:
21
:5
--> $DIR/lex-bad-numeric-literals.rs:
19
:5
|
LL | 0xu32;
| ^^
error: no valid digits found for number
--> $DIR/lex-bad-numeric-literals.rs:2
2
:5
--> $DIR/lex-bad-numeric-literals.rs:2
0
:5
|
LL | 0ou32;
| ^^
error: no valid digits found for number
--> $DIR/lex-bad-numeric-literals.rs:2
3
:5
--> $DIR/lex-bad-numeric-literals.rs:2
1
:5
|
LL | 0bu32;
| ^^
error: no valid digits found for number
--> $DIR/lex-bad-numeric-literals.rs:2
4
:5
--> $DIR/lex-bad-numeric-literals.rs:2
2
:5
|
LL | 0b;
| ^^
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:2
6
:5
--> $DIR/lex-bad-numeric-literals.rs:2
4
:5
|
LL | 0o123.456;
| ^^^^^^^^^
error: binary float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:2
8
:5
--> $DIR/lex-bad-numeric-literals.rs:2
6
:5
|
LL | 0b111.101;
| ^^^^^^^^^
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:
5
:5
--> $DIR/lex-bad-numeric-literals.rs:
3
:5
|
LL | 0o2f32;
| ^^^^^^ not supported
error: integer literal is too large
--> $DIR/lex-bad-numeric-literals.rs:1
6
:5
--> $DIR/lex-bad-numeric-literals.rs:1
4
:5
|
LL | 9900000000000000000000000000999999999999999999999999999999;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: integer literal is too large
--> $DIR/lex-bad-numeric-literals.rs:1
8
:5
--> $DIR/lex-bad-numeric-literals.rs:1
6
:5
|
LL | 9900000000000000000000000000999999999999999999999999999999;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: octal float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:2
5
:5
--> $DIR/lex-bad-numeric-literals.rs:2
3
:5
|
LL | 0o123f64;
| ^^^^^^^^ not supported
error: binary float literal is not supported
--> $DIR/lex-bad-numeric-literals.rs:2
7
:5
--> $DIR/lex-bad-numeric-literals.rs:2
5
:5
|
LL | 0b101f64;
| ^^^^^^^^ not supported
...
...
src/test/ui/parser/lex-bad-octal-literal.rs
浏览文件 @
d6ea6b97
fn
main
()
{
0o18
;
//~ ERROR invalid digit for a base 8 literal
0o1234_9_5670
;
//~ ERROR invalid digit for a base 8 literal
...
...
src/test/ui/parser/lex-bad-octal-literal.stderr
浏览文件 @
d6ea6b97
error: invalid digit for a base 8 literal
--> $DIR/lex-bad-octal-literal.rs:
4
:8
--> $DIR/lex-bad-octal-literal.rs:
2
:8
|
LL | 0o18;
| ^
error: invalid digit for a base 8 literal
--> $DIR/lex-bad-octal-literal.rs:
5
:12
--> $DIR/lex-bad-octal-literal.rs:
3
:12
|
LL | 0o1234_9_5670;
| ^
...
...
src/test/ui/parser/macro/macro-incomplete-parse.rs
浏览文件 @
d6ea6b97
macro_rules!
ignored_item
{
()
=>
{
fn
foo
()
{}
...
...
src/test/ui/parser/macro/macro-incomplete-parse.stderr
浏览文件 @
d6ea6b97
error: macro expansion ignores token `,` and any following
--> $DIR/macro-incomplete-parse.rs:
7
:9
--> $DIR/macro-incomplete-parse.rs:
5
:9
|
LL | ,
| ^
...
...
@@ -10,7 +10,7 @@ LL | ignored_item!();
= note: the usage of `ignored_item!` is likely invalid in item context
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `,`
--> $DIR/macro-incomplete-parse.rs:1
2
:14
--> $DIR/macro-incomplete-parse.rs:1
0
:14
|
LL | () => ( 1,
| ^ expected one of `.`, `;`, `?`, `}`, or an operator here
...
...
@@ -19,7 +19,7 @@ LL | ignored_expr!();
| ---------------- in this macro invocation
error: macro expansion ignores token `,` and any following
--> $DIR/macro-incomplete-parse.rs:1
8
:14
--> $DIR/macro-incomplete-parse.rs:1
6
:14
|
LL | () => ( 1, 2 )
| ^
...
...
src/test/ui/parser/new-unicode-escapes-4.rs
浏览文件 @
d6ea6b97
pub
fn
main
()
{
let
s
=
"
\
u{lol}"
;
//~^ ERROR invalid character in unicode escape: l
...
...
src/test/ui/parser/new-unicode-escapes-4.stderr
浏览文件 @
d6ea6b97
error: invalid character in unicode escape: l
--> $DIR/new-unicode-escapes-4.rs:
4
:17
--> $DIR/new-unicode-escapes-4.rs:
2
:17
|
LL | let s = "\u{lol}";
| ^
...
...
src/test/ui/parser/no-unsafe-self.rs
浏览文件 @
d6ea6b97
trait
A
{
fn
foo
(
*
mut
self
);
//~ ERROR cannot pass `self` by raw pointer
fn
baz
(
*
const
self
);
//~ ERROR cannot pass `self` by raw pointer
...
...
src/test/ui/parser/no-unsafe-self.stderr
浏览文件 @
d6ea6b97
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:
4
:17
--> $DIR/no-unsafe-self.rs:
2
:17
|
LL | fn foo(*mut self);
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:
5
:19
--> $DIR/no-unsafe-self.rs:
3
:19
|
LL | fn baz(*const self);
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:
6
:13
--> $DIR/no-unsafe-self.rs:
4
:13
|
LL | fn bar(*self);
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:
11
:17
--> $DIR/no-unsafe-self.rs:
9
:17
|
LL | fn foo(*mut self) { }
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:1
2
:19
--> $DIR/no-unsafe-self.rs:1
0
:19
|
LL | fn baz(*const self) { }
| ^^^^ cannot pass `self` by raw pointer
error: cannot pass `self` by raw pointer
--> $DIR/no-unsafe-self.rs:1
3
:13
--> $DIR/no-unsafe-self.rs:1
1
:13
|
LL | fn bar(*self) { }
| ^^^^ cannot pass `self` by raw pointer
...
...
src/test/ui/parser/range_inclusive_dotdotdot.rs
浏览文件 @
d6ea6b97
// Make sure that inclusive ranges with `...` syntax don't parse.
use
std
::
ops
::
RangeToInclusive
;
...
...
src/test/ui/parser/range_inclusive_dotdotdot.stderr
浏览文件 @
d6ea6b97
error: unexpected token: `...`
--> $DIR/range_inclusive_dotdotdot.rs:
8
:12
--> $DIR/range_inclusive_dotdotdot.rs:
6
:12
|
LL | return ...1;
| ^^^
...
...
@@ -13,7 +13,7 @@ LL | return ..=1;
| ^^^
error: unexpected token: `...`
--> $DIR/range_inclusive_dotdotdot.rs:1
4
:13
--> $DIR/range_inclusive_dotdotdot.rs:1
2
:13
|
LL | let x = ...0;
| ^^^
...
...
@@ -27,7 +27,7 @@ LL | let x = ..=0;
| ^^^
error: unexpected token: `...`
--> $DIR/range_inclusive_dotdotdot.rs:1
8
:14
--> $DIR/range_inclusive_dotdotdot.rs:1
6
:14
|
LL | let x = 5...5;
| ^^^
...
...
@@ -41,7 +41,7 @@ LL | let x = 5..=5;
| ^^^
error: unexpected token: `...`
--> $DIR/range_inclusive_dotdotdot.rs:2
2
:15
--> $DIR/range_inclusive_dotdotdot.rs:2
0
:15
|
LL | for _ in 0...1 {}
| ^^^
...
...
src/test/ui/parser/raw-byte-string-literals.rs
浏览文件 @
d6ea6b97
pub
fn
main
()
{
br
"é"
;
//~ ERROR raw byte string must be ASCII
br
##
~
"a"
~
##
;
//~ ERROR only `#` is allowed in raw string delimitation
...
...
src/test/ui/parser/raw-byte-string-literals.stderr
浏览文件 @
d6ea6b97
error: raw byte string must be ASCII: \u{e9}
--> $DIR/raw-byte-string-literals.rs:
5
:8
--> $DIR/raw-byte-string-literals.rs:
2
:8
|
LL | br"é";
| ^
error: found invalid character; only `#` is allowed in raw string delimitation: ~
--> $DIR/raw-byte-string-literals.rs:
6
:6
--> $DIR/raw-byte-string-literals.rs:
3
:6
|
LL | br##~"a"~##;
| ^^^
...
...
src/test/ui/parser/recover-enum.rs
浏览文件 @
d6ea6b97
fn
main
()
{
enum
Test
{
Very
...
...
src/test/ui/parser/recover-enum.stderr
浏览文件 @
d6ea6b97
error: missing comma
--> $DIR/recover-enum.rs:
5
:13
--> $DIR/recover-enum.rs:
3
:13
|
LL | Very
| ^ help: missing comma
error: missing comma
--> $DIR/recover-enum.rs:
7
:19
--> $DIR/recover-enum.rs:
5
:19
|
LL | Bad(usize)
| ^ help: missing comma
error: missing comma
--> $DIR/recover-enum.rs:
9
:27
--> $DIR/recover-enum.rs:
7
:27
|
LL | Stuff { a: usize }
| ^ help: missing comma
...
...
src/test/ui/parser/recover-enum2.rs
浏览文件 @
d6ea6b97
fn
main
()
{
enum
Test
{
Var1
,
...
...
src/test/ui/parser/recover-enum2.stderr
浏览文件 @
d6ea6b97
error: expected type, found `{`
--> $DIR/recover-enum2.rs:
8
:18
--> $DIR/recover-enum2.rs:
6
:18
|
LL | abc: {},
| ^
error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `{`
--> $DIR/recover-enum2.rs:2
7
:22
--> $DIR/recover-enum2.rs:2
5
:22
|
LL | Nope(i32 {})
| ^ expected one of 7 possible tokens here
...
...
src/test/ui/parser/recover-struct.rs
浏览文件 @
d6ea6b97
fn
main
()
{
struct
Test
{
Very
...
...
src/test/ui/parser/recover-struct.stderr
浏览文件 @
d6ea6b97
error: expected `:`, found `Bad`
--> $DIR/recover-struct.rs:
6
:9
--> $DIR/recover-struct.rs:
4
:9
|
LL | Very
| - expected `:`
...
...
src/test/ui/parser/removed-syntax-field-let.rs
浏览文件 @
d6ea6b97
struct
S
{
let
foo
:
(),
//~^ ERROR expected identifier, found keyword `let`
...
...
src/test/ui/parser/removed-syntax-field-let.stderr
浏览文件 @
d6ea6b97
error: expected identifier, found keyword `let`
--> $DIR/removed-syntax-field-let.rs:
4
:5
--> $DIR/removed-syntax-field-let.rs:
2
:5
|
LL | let foo: (),
| ^^^ expected identifier, found keyword
...
...
@@ -9,7 +9,7 @@ LL | r#let foo: (),
| ^^^^^
error: expected `:`, found `foo`
--> $DIR/removed-syntax-field-let.rs:
4
:9
--> $DIR/removed-syntax-field-let.rs:
2
:9
|
LL | let foo: (),
| ^^^ expected `:`
...
...
src/test/ui/parser/trailing-plus-in-bounds.rs
浏览文件 @
d6ea6b97
// compile-pass
#![feature(box_syntax)]
#![allow(bare_trait_objects)]
...
...
src/test/ui/parser/trait-bounds-not-on-impl.rs
浏览文件 @
d6ea6b97
trait
Foo
{
}
trait
Foo
{}
struct
Bar
;
impl
Foo
+
Owned
for
Bar
{
//~ ERROR expected a trait, found type
}
impl
Foo
+
Owned
for
Bar
{}
//~ ERROR expected a trait, found type
fn
main
()
{
}
src/test/ui/parser/trait-bounds-not-on-impl.stderr
浏览文件 @
d6ea6b97
error: expected a trait, found type
--> $DIR/trait-bounds-not-on-impl.rs:
8
:6
--> $DIR/trait-bounds-not-on-impl.rs:
5
:6
|
LL | impl Foo + Owned for Bar {
LL | impl Foo + Owned for Bar {
}
| ^^^^^^^^^^^
error: aborting due to previous error
...
...
src/test/ui/parser/trait-object-bad-parens.rs
浏览文件 @
d6ea6b97
#![feature(optin_builtin_traits)]
#![allow(bare_trait_objects)]
...
...
src/test/ui/parser/trait-object-bad-parens.stderr
浏览文件 @
d6ea6b97
error[E0178]: expected a path on the left-hand side of `+`, not `((Auto))`
--> $DIR/trait-object-bad-parens.rs:
9
:16
--> $DIR/trait-object-bad-parens.rs:
7
:16
|
LL | let _: Box<((Auto)) + Auto>;
| ^^^^^^^^^^^^^^^ expected a path
error[E0178]: expected a path on the left-hand side of `+`, not `(Auto + Auto)`
--> $DIR/trait-object-bad-parens.rs:
11
:16
--> $DIR/trait-object-bad-parens.rs:
9
:16
|
LL | let _: Box<(Auto + Auto) + Auto>;
| ^^^^^^^^^^^^^^^^^^^^ expected a path
error[E0178]: expected a path on the left-hand side of `+`, not `(Auto)`
--> $DIR/trait-object-bad-parens.rs:1
3
:16
--> $DIR/trait-object-bad-parens.rs:1
1
:16
|
LL | let _: Box<(Auto +) + Auto>;
| ^^^^^^^^^^^^^^^ expected a path
error[E0178]: expected a path on the left-hand side of `+`, not `(dyn Auto)`
--> $DIR/trait-object-bad-parens.rs:1
5
:16
--> $DIR/trait-object-bad-parens.rs:1
3
:16
|
LL | let _: Box<(dyn Auto) + Auto>;
| ^^^^^^^^^^^^^^^^^ expected a path
...
...
src/test/ui/parser/trait-object-lifetime-parens.rs
浏览文件 @
d6ea6b97
#![allow(bare_trait_objects)]
trait
Trait
{}
...
...
src/test/ui/parser/trait-object-lifetime-parens.stderr
浏览文件 @
d6ea6b97
error: parenthesized lifetime bounds are not supported
--> $DIR/trait-object-lifetime-parens.rs:
7
:21
--> $DIR/trait-object-lifetime-parens.rs:
5
:21
|
LL | fn f<'a, T: Trait + ('a)>() {}
| ^^^^ help: remove the parentheses
error: parenthesized lifetime bounds are not supported
--> $DIR/trait-object-lifetime-parens.rs:
10
:24
--> $DIR/trait-object-lifetime-parens.rs:
8
:24
|
LL | let _: Box<Trait + ('a)>;
| ^^^^ help: remove the parentheses
error: expected `:`, found `)`
--> $DIR/trait-object-lifetime-parens.rs:
11
:19
--> $DIR/trait-object-lifetime-parens.rs:
9
:19
|
LL | let _: Box<('a) + Trait>;
| ^ expected `:`
error: chained comparison operators require parentheses
--> $DIR/trait-object-lifetime-parens.rs:
11
:15
--> $DIR/trait-object-lifetime-parens.rs:
9
:15
|
LL | let _: Box<('a) + Trait>;
| ^^^^^^^^^^^^^^^
...
...
@@ -26,7 +26,7 @@ LL | let _: Box<('a) + Trait>;
= help: or use `(...)` if you meant to specify fn arguments
error: expected type, found `'a`
--> $DIR/trait-object-lifetime-parens.rs:
11
:17
--> $DIR/trait-object-lifetime-parens.rs:
9
:17
|
LL | let _: Box<('a) + Trait>;
| - ^^
...
...
src/test/ui/parser/use-as-where-use-ends-with-mod-sep.rs
浏览文件 @
d6ea6b97
use
std
::
any
::
as
foo
;
//~ ERROR expected identifier, found keyword `as`
//~^ ERROR: expected one of `::`, `;`, or `as`, found `foo`
src/test/ui/parser/use-as-where-use-ends-with-mod-sep.stderr
浏览文件 @
d6ea6b97
error: expected identifier, found keyword `as`
--> $DIR/use-as-where-use-ends-with-mod-sep.rs:
3
:16
--> $DIR/use-as-where-use-ends-with-mod-sep.rs:
1
:16
|
LL | use std::any:: as foo;
| ^^ expected identifier, found keyword
...
...
@@ -9,7 +9,7 @@ LL | use std::any:: r#as foo;
| ^^^^
error: expected one of `::`, `;`, or `as`, found `foo`
--> $DIR/use-as-where-use-ends-with-mod-sep.rs:
3
:19
--> $DIR/use-as-where-use-ends-with-mod-sep.rs:
1
:19
|
LL | use std::any:: as foo;
| ^^^ expected one of `::`, `;`, or `as` here
...
...
src/test/ui/parser/where-clauses-no-bounds-or-predicates.rs
浏览文件 @
d6ea6b97
// Empty predicate list is OK
fn
equal1
<
T
>
(
_
:
&
T
,
_
:
&
T
)
->
bool
where
{
true
...
...
src/test/ui/parser/where-clauses-no-bounds-or-predicates.stderr
浏览文件 @
d6ea6b97
error: expected `:`, found `{`
--> $DIR/where-clauses-no-bounds-or-predicates.rs:1
3
:23
--> $DIR/where-clauses-no-bounds-or-predicates.rs:1
1
:23
|
LL | fn foo<'a>() where 'a {}
| ^ expected `:`
...
...
src/test/ui/self/self_type_keyword.rs
浏览文件 @
d6ea6b97
mod
foo
{
struct
Self
;
//~^ ERROR expected identifier, found keyword `Self`
...
...
src/test/ui/self/self_type_keyword.stderr
浏览文件 @
d6ea6b97
error: expected identifier, found keyword `Self`
--> $DIR/self_type_keyword.rs:
4
:10
--> $DIR/self_type_keyword.rs:
2
:10
|
LL | struct Self;
| ^^^^ expected identifier, found keyword
error: expected identifier, found keyword `Self`
--> $DIR/self_type_keyword.rs:1
6
:13
--> $DIR/self_type_keyword.rs:1
4
:13
|
LL | ref Self => (),
| ^^^^ expected identifier, found keyword
error: expected identifier, found keyword `Self`
--> $DIR/self_type_keyword.rs:1
8
:13
--> $DIR/self_type_keyword.rs:1
6
:13
|
LL | mut Self => (),
| ^^^^ expected identifier, found keyword
error: expected identifier, found keyword `Self`
--> $DIR/self_type_keyword.rs:
20
:17
--> $DIR/self_type_keyword.rs:
18
:17
|
LL | ref mut Self => (),
| ^^^^ expected identifier, found keyword
error: expected identifier, found keyword `Self`
--> $DIR/self_type_keyword.rs:2
4
:15
--> $DIR/self_type_keyword.rs:2
2
:15
|
LL | Foo { Self } => (),
| ^^^^ expected identifier, found keyword
error: expected identifier, found keyword `Self`
--> $DIR/self_type_keyword.rs:
30
:26
--> $DIR/self_type_keyword.rs:
28
:26
|
LL | extern crate core as Self;
| ^^^^ expected identifier, found keyword
error: expected identifier, found keyword `Self`
--> $DIR/self_type_keyword.rs:3
5
:32
--> $DIR/self_type_keyword.rs:3
3
:32
|
LL | use std::option::Option as Self;
| ^^^^ expected identifier, found keyword
error: expected identifier, found keyword `Self`
--> $DIR/self_type_keyword.rs:
40
:11
--> $DIR/self_type_keyword.rs:
38
:11
|
LL | trait Self {}
| ^^^^ expected identifier, found keyword
error: lifetimes cannot use keyword names
--> $DIR/self_type_keyword.rs:
8
:12
--> $DIR/self_type_keyword.rs:
6
:12
|
LL | struct Bar<'Self>;
| ^^^^^
error: cannot find macro `Self!` in this scope
--> $DIR/self_type_keyword.rs:2
2
:9
--> $DIR/self_type_keyword.rs:2
0
:9
|
LL | Self!() => (),
| ^^^^
error[E0392]: parameter `'Self` is never used
--> $DIR/self_type_keyword.rs:
8
:12
--> $DIR/self_type_keyword.rs:
6
:12
|
LL | struct Bar<'Self>;
| ^^^^^ unused parameter
...
...
src/test/ui/traits/trait-object-vs-lifetime-2.rs
浏览文件 @
d6ea6b97
// A few contrived examples where lifetime should (or should not) be parsed as an object type.
// Lifetimes parsed as types are still rejected later by semantic checks.
// `'static` is a lifetime, `'static +` is a type, `'a` is a type
fn
g
()
where
'static
:
'static
,
...
...
src/test/ui/traits/trait-object-vs-lifetime-2.stderr
浏览文件 @
d6ea6b97
error[E0224]: at least one non-builtin trait is required for an object type
--> $DIR/trait-object-vs-lifetime-2.rs:
9
:5
--> $DIR/trait-object-vs-lifetime-2.rs:
7
:5
|
LL | dyn 'static +: 'static + Copy,
| ^^^^^^^^^^^^^
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录