about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-10 08:13:16 +0200
committerGitHub <noreply@github.com>2019-08-10 08:13:16 +0200
commiteb44561600a3f2edceae13d1395ca84d7a23dc17 (patch)
tree2a28987934814c0a315d210f0487344ef8a74dbe /src/test/debuginfo/enum-thinlto.rs
parentbe8bbb06976c8065425b18e9cbe24a6d1d4e7515 (diff)
parentcbcc7dd182b9bf67d664508b82284c5539ef8819 (diff)
downloadrust-eb44561600a3f2edceae13d1395ca84d7a23dc17.tar.gz
rust-eb44561600a3f2edceae13d1395ca84d7a23dc17.zip
Rollup merge of #63056 - petrochenkov:macstd2, r=alexcrichton
Give built-in macros stable addresses in the standard library

Continuation of https://github.com/rust-lang/rust/pull/62086.

Derive macros corresponding to traits from libcore are now available through the same paths as those traits:
- `Clone` - `{core,std}::clone::Clone`
- `PartialEq` - `{core,std}::cmp::PartialEq`
- `Eq` - `{core,std}::cmp::Eq`
- `PartialOrd` - `{core,std}::cmp::PartialOrd`
- `Ord` - `{core,std}::cmp::Ord`
- `Default` - `{core,std}::default::Default`
- `Debug` - `{core,std}::fmt::Debug`
- `Hash` - `{core,std}::hash::Hash`
- `Copy` - `{core,std}::marker::Copy`

Fn-like built-in macros are now available through libcore and libstd's root module, by analogy with non-builtin macros defined by libcore and libstd:
```rust
{core,std}::{
    __rust_unstable_column,
    asm,
    assert,
    cfg,
    column,
    compile_error,
    concat,
    concat_idents,
    env,
    file,
    format_args,
    format_args_nl,
    global_asm,
    include,
    include_bytes,
    include_str,
    line,
    log_syntax,
    module_path,
    option_env,
    stringify,
    trace_macros,
}
```

Derive macros without a corresponding trait in libcore or libstd are still available only through prelude (also see https://github.com/rust-lang/rust/pull/62507).
Attribute macros also keep being available only through prelude, mostly because they don't have an existing practice to follow. An advice from the library team on their eventual placement would be appreciated.
```rust
    RustcDecodable,
    RustcEncodable,
    bench,
    global_allocator,
    test,
    test_case,
```

r? @alexcrichton
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions