Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
09275802
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
09275802
编写于
3月 27, 2021
作者:
S
Simon Jakobi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add regression tests for #56445
Closes #56445.
上级
aef11409
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
48 addition
and
3 deletion
+48
-3
src/test/ui/const-generics/issues/issue-56445-1.full.stderr
src/test/ui/const-generics/issues/issue-56445-1.full.stderr
+2
-2
src/test/ui/const-generics/issues/issue-56445-1.min.stderr
src/test/ui/const-generics/issues/issue-56445-1.min.stderr
+1
-1
src/test/ui/const-generics/issues/issue-56445-1.rs
src/test/ui/const-generics/issues/issue-56445-1.rs
+0
-0
src/test/ui/const-generics/issues/issue-56445-2.rs
src/test/ui/const-generics/issues/issue-56445-2.rs
+11
-0
src/test/ui/const-generics/issues/issue-56445-2.stderr
src/test/ui/const-generics/issues/issue-56445-2.stderr
+14
-0
src/test/ui/const-generics/issues/issue-56445-3.rs
src/test/ui/const-generics/issues/issue-56445-3.rs
+12
-0
src/test/ui/const-generics/issues/issue-56445-3.stderr
src/test/ui/const-generics/issues/issue-56445-3.stderr
+8
-0
未找到文件。
src/test/ui/const-generics/issues/issue-56445.full.stderr
→
src/test/ui/const-generics/issues/issue-56445
-1
.full.stderr
浏览文件 @
09275802
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/issue-56445.rs:3:27
--> $DIR/issue-56445
-1
.rs:3:27
|
LL | #![cfg_attr(full, feature(const_generics))]
| ^^^^^^^^^^^^^^
...
...
@@ -8,7 +8,7 @@ LL | #![cfg_attr(full, feature(const_generics))]
= note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
error[E0771]: use of non-static lifetime `'a` in const generic
--> $DIR/issue-56445.rs:8:26
--> $DIR/issue-56445
-1
.rs:8:26
|
LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
| ^^
...
...
src/test/ui/const-generics/issues/issue-56445.min.stderr
→
src/test/ui/const-generics/issues/issue-56445
-1
.min.stderr
浏览文件 @
09275802
error[E0771]: use of non-static lifetime `'a` in const generic
--> $DIR/issue-56445.rs:8:26
--> $DIR/issue-56445
-1
.rs:8:26
|
LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
| ^^
...
...
src/test/ui/const-generics/issues/issue-56445.rs
→
src/test/ui/const-generics/issues/issue-56445
-1
.rs
浏览文件 @
09275802
文件已移动
src/test/ui/const-generics/issues/issue-56445-2.rs
0 → 100644
浏览文件 @
09275802
// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-502095133
struct
OnDiskDirEntry
<
'a
>
{
_
s
:
&
'a
usize
}
impl
<
'a
>
OnDiskDirEntry
<
'a
>
{
const
LFN_FRAGMENT_LEN
:
usize
=
2
;
fn
lfn_contents
(
&
self
)
->
[
char
;
Self
::
LFN_FRAGMENT_LEN
]
{
loop
{
}
}
//~^ ERROR: generic `Self` types are currently not permitted in anonymous constants
}
fn
main
()
{}
src/test/ui/const-generics/issues/issue-56445-2.stderr
0 → 100644
浏览文件 @
09275802
error: generic `Self` types are currently not permitted in anonymous constants
--> $DIR/issue-56445-2.rs:7:38
|
LL | fn lfn_contents(&self) -> [char; Self::LFN_FRAGMENT_LEN] { loop { } }
| ^^^^
|
note: not a concrete type
--> $DIR/issue-56445-2.rs:4:10
|
LL | impl<'a> OnDiskDirEntry<'a> {
| ^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
src/test/ui/const-generics/issues/issue-56445-3.rs
0 → 100644
浏览文件 @
09275802
// Regression test for https://github.com/rust-lang/rust/issues/56445#issuecomment-524494170
pub
struct
Memory
<
'rom
>
{
rom
:
&
'rom
[
u8
],
ram
:
[
u8
;
Self
::
SIZE
],
//~^ ERROR: generic `Self` types are currently not permitted in anonymous constants
}
impl
<
'rom
>
Memory
<
'rom
>
{
pub
const
SIZE
:
usize
=
0x8000
;
}
fn
main
()
{}
src/test/ui/const-generics/issues/issue-56445-3.stderr
0 → 100644
浏览文件 @
09275802
error: generic `Self` types are currently not permitted in anonymous constants
--> $DIR/issue-56445-3.rs:4:15
|
LL | ram: [u8; Self::SIZE],
| ^^^^
error: aborting due to previous error
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录