Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
f4f96e29
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,发现更多精彩内容 >>
提交
f4f96e29
编写于
1月 22, 2020
作者:
V
varkor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Normalise diagnostics with respect to "the X is declared/defined here"
上级
dee12bb2
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
8 addition
and
8 deletion
+8
-8
src/librustc_metadata/creader.rs
src/librustc_metadata/creader.rs
+1
-1
src/librustc_mir/borrow_check/diagnostics/conflict_errors.rs
src/librustc_mir/borrow_check/diagnostics/conflict_errors.rs
+1
-1
src/librustc_mir/borrow_check/diagnostics/region_errors.rs
src/librustc_mir/borrow_check/diagnostics/region_errors.rs
+1
-1
src/test/ui/allocator/two-allocators.stderr
src/test/ui/allocator/two-allocators.stderr
+1
-1
src/test/ui/borrowck/issue-45983.nll.stderr
src/test/ui/borrowck/issue-45983.nll.stderr
+1
-1
src/test/ui/generator/ref-escapes-but-not-over-yield.stderr
src/test/ui/generator/ref-escapes-but-not-over-yield.stderr
+1
-1
src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
...roximated-shorter-to-static-comparing-against-free.stderr
+1
-1
src/test/ui/nll/outlives-suggestion-simple.stderr
src/test/ui/nll/outlives-suggestion-simple.stderr
+1
-1
未找到文件。
src/librustc_metadata/creader.rs
浏览文件 @
f4f96e29
...
...
@@ -694,7 +694,7 @@ fn inject_allocator_crate(&mut self, krate: &ast::Crate) {
self
.sess
.struct_span_err
(
*
span2
,
"cannot define multiple global allocators"
)
.span_label
(
*
span2
,
"cannot define a new global allocator"
)
.span_label
(
*
span1
,
"previous global allocator
is
defined here"
)
.span_label
(
*
span1
,
"previous global allocator defined here"
)
.emit
();
true
}
...
...
src/librustc_mir/borrow_check/diagnostics/conflict_errors.rs
浏览文件 @
f4f96e29
...
...
@@ -1259,7 +1259,7 @@ fn report_escaping_data(
err
.span_label
(
upvar_span
,
format!
(
"`{}`
is
declared here, outside of the {} body"
,
upvar_name
,
escapes_from
),
format!
(
"`{}` declared here, outside of the {} body"
,
upvar_name
,
escapes_from
),
);
err
.span_label
(
borrow_span
,
format!
(
"borrow is only valid in the {} body"
,
escapes_from
));
...
...
src/librustc_mir/borrow_check/diagnostics/region_errors.rs
浏览文件 @
f4f96e29
...
...
@@ -457,7 +457,7 @@ fn report_escaping_data_error(&self, errci: &ErrorConstraintInfo) -> DiagnosticB
diag
.span_label
(
outlived_fr_span
,
format!
(
"`{}`
is
declared here, outside of the {} body"
,
"`{}` declared here, outside of the {} body"
,
outlived_fr_name
,
escapes_from
),
);
...
...
src/test/ui/allocator/two-allocators.stderr
浏览文件 @
f4f96e29
...
...
@@ -2,7 +2,7 @@ error: cannot define multiple global allocators
--> $DIR/two-allocators.rs:6:1
|
LL | static A: System = System;
| -------------------------- previous global allocator
is
defined here
| -------------------------- previous global allocator defined here
LL | #[global_allocator]
LL | static B: System = System;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot define a new global allocator
...
...
src/test/ui/borrowck/issue-45983.nll.stderr
浏览文件 @
f4f96e29
...
...
@@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of closure
--> $DIR/issue-45983.rs:20:18
|
LL | let x = None;
| - `x`
is
declared here, outside of the closure body
| - `x` declared here, outside of the closure body
LL | give_any(|y| x = Some(y));
| - ^^^^^^^^^^^ `y` escapes the closure body here
| |
...
...
src/test/ui/generator/ref-escapes-but-not-over-yield.stderr
浏览文件 @
f4f96e29
...
...
@@ -2,7 +2,7 @@ error[E0521]: borrowed data escapes outside of generator
--> $DIR/ref-escapes-but-not-over-yield.rs:11:9
|
LL | let mut a = &3;
| ----- `a`
is
declared here, outside of the generator body
| ----- `a` declared here, outside of the generator body
...
LL | a = &b;
| ^^^^--
...
...
src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr
浏览文件 @
f4f96e29
...
...
@@ -19,7 +19,7 @@ error[E0521]: borrowed data escapes outside of closure
LL | foo(cell, |cell_a, cell_x| {
| ------ ------ `cell_x` is a reference that is only valid in the closure body
| |
| `cell_a`
is
declared here, outside of the closure body
| `cell_a` declared here, outside of the closure body
LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
| ^^^^^^^^^^^^^^^^^^^^^^^^ `cell_x` escapes the closure body here
...
...
src/test/ui/nll/outlives-suggestion-simple.stderr
浏览文件 @
f4f96e29
...
...
@@ -99,7 +99,7 @@ error[E0521]: borrowed data escapes outside of function
LL | fn get_bar(&self) -> Bar2 {
| -----
| |
| `self`
is
declared here, outside of the function body
| `self` declared here, outside of the function body
| `self` is a reference that is only valid in the function body
LL | Bar2::new(&self)
| ^^^^^^^^^^^^^^^^ `self` escapes the function body here
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录