forked from rust-lang/glacier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust-lang/rust#99665 rust-lang/rust#99734 rust-lang/rust#99777 rust-lang/rust#99820 rust-lang/rust#99828
- Loading branch information
1 parent
59c8820
commit c9014fc
Showing
8 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pub trait MyComponent { | ||
type Properties; | ||
} | ||
|
||
impl<M> MyComponent for M | ||
where | ||
M: 'static, | ||
{ | ||
type Properties = (); | ||
} | ||
|
||
fn main() { | ||
|_: <&u8 as MyComponent>::Properties| {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
pub trait MyComponent { | ||
type Properties; | ||
} | ||
|
||
impl<M> MyComponent for M | ||
where | ||
M: 'static, | ||
{ | ||
type Properties = TableProps<M>; | ||
} | ||
|
||
pub struct TableProps<M> | ||
where | ||
M: 'static, | ||
{ | ||
pub entries: M, | ||
} | ||
|
||
fn main() { | ||
|_: <&u32 as MyComponent>::Properties| {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
cat > out.rs <<'EOF' | ||
pub use std::*; | ||
pub mod task {} | ||
pub fn main() { | ||
println!("Hello, world!"); | ||
} | ||
EOF | ||
|
||
rustdoc out.rs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pub fn test() { | ||
#[doc(alias = "test")] | ||
let num_flags = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pub fn test() { | ||
#[doc(alias = "test")] | ||
let num_flags = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn main() { | ||
match () { | ||
#[doc(alias = "foo")] | ||
_ => {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#![feature(const_trait_impl)] | ||
#![feature(fn_traits)] | ||
#![feature(unboxed_closures)] | ||
|
||
struct Closure; | ||
|
||
impl const FnOnce<&usize> for Closure { | ||
type Output = usize; | ||
|
||
extern "rust-call" fn call_once(self, arg: &usize) -> Self::Output { | ||
*arg | ||
} | ||
} | ||
|
||
enum Bug<T = [(); Closure.call_once(&0) ]> { | ||
V(T), | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
fn get_iter(vec: &[i32]) -> impl Iterator<Item = {}> + '_ { | ||
vec.iter() | ||
} | ||
|
||
fn main() { | ||
let vec = Vec::new(); | ||
let mut iter = get_iter(&vec); | ||
iter.next(); | ||
} |