Skip to content

Commit

Permalink
Add ui test reproducing issue 163
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 18, 2021
1 parent 7966eb3 commit 8602ca3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/ui/from-backtrace-backtrace.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// https://github.com/dtolnay/thiserror/issues/163

#![feature(backtrace)]

use std::backtrace::Backtrace;
use thiserror::Error;

#[derive(Error, Debug)]
#[error("...")]
pub struct Error(#[from] #[backtrace] std::io::Error, Backtrace);

fn main() {}
5 changes: 5 additions & 0 deletions tests/ui/from-backtrace-backtrace.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
error[E0063]: missing field `1` in initializer of `Error`
--> tests/ui/from-backtrace-backtrace.rs:10:12
|
10 | pub struct Error(#[from] #[backtrace] std::io::Error, Backtrace);
| ^^^^^ missing `1`

0 comments on commit 8602ca3

Please sign in to comment.