rustc-ap-rustc_error_codes 638.0.0

Automatically published version of the package `rustc_error_codes` in the rust-lang/rust repository from commit 30ca215b4e38b32aa7abdd635c5e2d56f5724494 The publishing script for this crate lives at: https://github.com/alexcrichton/rustc-auto-publish
Documentation
`#[track_caller]` cannot be used in traits yet. This is due to limitations in
the compiler which are likely to be temporary. See [RFC 2091] for details on
this and other restrictions.

Erroneous example with a trait method implementation:

```compile_fail,E0738
#![feature(track_caller)]

trait Foo {
    fn bar(&self);
}

impl Foo for u64 {
    #[track_caller]
    fn bar(&self) {}
}
```

Erroneous example with a blanket trait method implementation:

```compile_fail,E0738
#![feature(track_caller)]

trait Foo {
    #[track_caller]
    fn bar(&self) {}
    fn baz(&self);
}
```

Erroneous example with a trait method declaration:

```compile_fail,E0738
#![feature(track_caller)]

trait Foo {
    fn bar(&self) {}

    #[track_caller]
    fn baz(&self);
}
```

Note that while the compiler may be able to support the attribute in traits in
the future, [RFC 2091] prohibits their implementation without a follow-up RFC.

[RFC 2091]: https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md