Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
106e5c55
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,发现更多精彩内容 >>
提交
106e5c55
编写于
1月 26, 2018
作者:
E
Esteban Küber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't add "in this macro invocation" label to desugared spans
上级
f90c4456
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
20 deletion
+5
-20
src/librustc_errors/emitter.rs
src/librustc_errors/emitter.rs
+1
-0
src/test/ui/const-fn-error.stderr
src/test/ui/const-fn-error.stderr
+0
-4
src/test/ui/suggestions/try-on-option.stderr
src/test/ui/suggestions/try-on-option.stderr
+1
-4
src/test/ui/suggestions/try-operator-on-main.stderr
src/test/ui/suggestions/try-operator-on-main.stderr
+3
-12
未找到文件。
src/librustc_errors/emitter.rs
浏览文件 @
106e5c55
...
...
@@ -767,6 +767,7 @@ fn fix_multispan_in_std_macros(&mut self,
}
// Check to make sure we're not in any <*macros>
if
!
cm
.span_to_filename
(
def_site
)
.is_macros
()
&&
!
trace
.macro_decl_name
.starts_with
(
"desugaring of "
)
&&
!
trace
.macro_decl_name
.starts_with
(
"#["
)
||
always_backtrace
{
new_labels
.push
((
trace
.call_site
,
...
...
src/test/ui/const-fn-error.stderr
浏览文件 @
106e5c55
...
...
@@ -17,16 +17,12 @@ error[E0015]: calls in constant functions are limited to constant functions, str
|
17 | for i in 0..x { //~ ERROR calls in constant functions
| ^^^^
| |
| in this macro invocation
error[E0019]: constant function contains unimplemented expression type
--> $DIR/const-fn-error.rs:17:14
|
17 | for i in 0..x { //~ ERROR calls in constant functions
| ^^^^
| |
| in this macro invocation
error[E0080]: constant evaluation error
--> $DIR/const-fn-error.rs:21:5
...
...
src/test/ui/suggestions/try-on-option.stderr
浏览文件 @
106e5c55
...
...
@@ -10,10 +10,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu
--> $DIR/try-on-option.rs:23:5
|
23 | x?; //~ the `?` operator
| --
| |
| cannot use the `?` operator in a function that returns `u32`
| in this macro invocation
| ^^ cannot use the `?` operator in a function that returns `u32`
|
= help: the trait `std::ops::Try` is not implemented for `u32`
= note: required by `std::ops::Try::from_error`
...
...
src/test/ui/suggestions/try-operator-on-main.stderr
浏览文件 @
106e5c55
...
...
@@ -2,10 +2,7 @@ error[E0277]: the `?` operator can only be used in a function that returns `Resu
--> $DIR/try-operator-on-main.rs:19:5
|
19 | std::fs::File::open("foo")?; //~ ERROR the `?` operator can only
| ---------------------------
| |
| cannot use the `?` operator in a function that returns `()`
| in this macro invocation
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::from_error`
...
...
@@ -14,10 +11,7 @@ error[E0277]: the `?` operator can only be applied to values that implement `std
--> $DIR/try-operator-on-main.rs:22:5
|
22 | ()?; //~ ERROR the `?` operator can only
| ---
| |
| the `?` operator cannot be applied to type `()`
| in this macro invocation
| ^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`
...
...
@@ -38,10 +32,7 @@ error[E0277]: the `?` operator can only be applied to values that implement `std
--> $DIR/try-operator-on-main.rs:32:5
|
32 | ()?; //~ ERROR the `?` operator can only
| ---
| |
| the `?` operator cannot be applied to type `()`
| in this macro invocation
| ^^^ the `?` operator cannot be applied to type `()`
|
= help: the trait `std::ops::Try` is not implemented for `()`
= note: required by `std::ops::Try::into_result`
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录