File: type_shadowing.rs

package info (click to toggle)
rust-tracing-attributes 0.1.30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: makefile: 2
file content (17 lines) | stat: -rw-r--r-- 420 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! This program is a regression test for [#3306], where shadowing
//! caused compilation failure in certain cases due to the original
//! function body not getting its own scope.
//!
//! [#3306]: https://github.com/tokio-rs/tracing/issues/3306
type Foo = ();
enum Bar {
    Foo,
}

/*#[tracing::instrument]
fn this_is_fine() -> Foo {
    // glob import imports Bar::Foo, shadowing Foo
    use Bar::*;
}*/

fn main() {}