mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
re-add test and bless
This commit is contained in:
parent
90128c30a0
commit
07158effd3
@ -10,7 +10,7 @@ note: required for `GetNext<<<<<<... as Next>::Next as Next>::Next as Next>::Nex
|
||||
|
|
||||
LL | impl<T: Next> Next for GetNext<T> {
|
||||
| ^^^^ ^^^^^^^^^^
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-23122-2/issue-23122-2.long-type-2230235837754269907.txt'
|
||||
= note: the full type name has been written to '$TEST_BUILD_DIR/issues/issue-23122-2/issue-23122-2.long-type-3976323088118947840.txt'
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
30
src/test/ui/recursion/issue-95134.rs
Normal file
30
src/test/ui/recursion/issue-95134.rs
Normal file
@ -0,0 +1,30 @@
|
||||
// build-fail
|
||||
// known-bug: #95134
|
||||
// compile-flags: -Copt-level=0
|
||||
// failure-status: 101
|
||||
// dont-check-compiler-stderr
|
||||
|
||||
pub fn encode_num<Writer: ExampleWriter>(n: u32, mut writer: Writer) -> Result<(), Writer::Error> {
|
||||
if n > 15 {
|
||||
encode_num(n / 16, &mut writer)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub trait ExampleWriter {
|
||||
type Error;
|
||||
}
|
||||
|
||||
impl<'a, T: ExampleWriter> ExampleWriter for &'a mut T {
|
||||
type Error = T::Error;
|
||||
}
|
||||
|
||||
struct EmptyWriter;
|
||||
|
||||
impl ExampleWriter for EmptyWriter {
|
||||
type Error = ();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
encode_num(69, &mut EmptyWriter).unwrap();
|
||||
}
|
Loading…
Reference in New Issue
Block a user