Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d9256f9
Add Lazy{Cell,Lock}::into_inner
SUPERCILEX Dec 26, 2022
41e3cc4
Add some tests around (lack of) object safety of associated types and…
oli-obk Apr 20, 2023
adb5ded
add known-bug test for unsound issue 25860
whtahy Apr 18, 2023
2fb2098
add known-bug test for unsound issue 49206
whtahy Apr 18, 2023
232d685
add known-bug test for unsound issue 57893
whtahy Apr 19, 2023
fbfb620
add known-bug test for unsound issue 84366
whtahy Apr 19, 2023
cac62ab
add known-bug test for unsound issue 84533
whtahy Apr 19, 2023
be68c69
add known-bug test for unsound issue 84591
whtahy Apr 19, 2023
3c5de9a
add known-bug test for unsound issue 85099
whtahy Apr 20, 2023
0e68cbd
Remove useless special case.
cjgillot Apr 15, 2023
629cdb4
Move eval_discriminant.
cjgillot Apr 15, 2023
dd452ae
Simplify logic.
cjgillot Apr 15, 2023
dd78b99
Reduce rightward drift.
cjgillot Apr 15, 2023
3141262
add known-bug test for unsound issue 98117
whtahy Apr 22, 2023
cff6c0e
add known-bug test for unsound issue 100041
whtahy Apr 22, 2023
6f6550f
add known-bug test for unsound issue 100051
whtahy Apr 22, 2023
ebe61ce
add known-bug test for unsound issue 104005
whtahy Apr 22, 2023
7410960
format panic message only once
Apr 23, 2023
f5e535c
bootstrap: update paths cargo-credential crate
weihanglo Apr 23, 2023
89833f4
Rollup merge of #106152 - SUPERCILEX:lazycell, r=Amanieu
matthiaskrgr Apr 24, 2023
6facf69
Rollup merge of #110480 - whtahy:105107/known-bug-tests-for-unsound-i…
matthiaskrgr Apr 24, 2023
cb3d4ea
Rollup merge of #110590 - oli-obk:object_safe_assoc_types, r=jackh726
matthiaskrgr Apr 24, 2023
1b0c552
Rollup merge of #110685 - cjgillot:clean-dcp, r=oli-obk
matthiaskrgr Apr 24, 2023
13e8f09
Rollup merge of #110721 - lukas-code:panic-fmt, r=Amanieu
matthiaskrgr Apr 24, 2023
7c8d93c
Rollup merge of #110744 - weihanglo:cargo-credential-install, r=ehuss
matthiaskrgr Apr 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add known-bug test for unsound issue 100051
  • Loading branch information
whtahy committed Apr 22, 2023
commit 6f6550f156eb6ea18e90db1712b30460613ad4a8
31 changes: 31 additions & 0 deletions tests/ui/fn/implied-bounds-impl-header-projections.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// check-pass
// known-bug: #100051

// Should fail. Implied bounds from projections in impl headers can create
// improper lifetimes. Variant of issue #98543 which was fixed by #99217.

trait Trait {
type Type;
}

impl<T> Trait for T {
type Type = ();
}

trait Extend<'a, 'b> {
fn extend(self, s: &'a str) -> &'b str;
}

impl<'a, 'b> Extend<'a, 'b> for <&'b &'a () as Trait>::Type
where
for<'what, 'ever> &'what &'ever (): Trait,
{
fn extend(self, s: &'a str) -> &'b str {
s
}
}

fn main() {
let y = <() as Extend<'_, '_>>::extend((), &String::from("Hello World"));
println!("{}", y);
}