about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/errors.rs
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2024-01-20 18:48:41 -0800
committerDavid Tolnay <dtolnay@gmail.com>2024-01-20 19:00:27 -0800
commitc43344e839906624a388847906f6a9b27dcd35c4 (patch)
tree184f609aab9e21bb72dae455784b31ffb6194574 /compiler/rustc_pattern_analysis/src/errors.rs
parentf52b88e91f2d185a8be2bf4243827f7b720cd513 (diff)
downloadrust-c43344e839906624a388847906f6a9b27dcd35c4.tar.gz
rust-c43344e839906624a388847906f6a9b27dcd35c4.zip
Add test of thread_local containing multiline const block
Before making thread_local accept statements inside the const block,
this test would fail to compile as follows:

    error: no rules expected the token `let`
       --> library/std/tests/thread.rs:26:13
        |
    26  |             let value = 1;
        |             ^^^ no rules expected this token in macro call
        |
    note: while trying to match meta-variable `$init:expr`
       --> library/std/src/thread/local.rs:189:69
        |
    189 |     ($(#[$attr:meta])* $vis:vis static $name:ident: $t:ty = const { $init:expr }; $($rest:tt)*) => (
        |                                                                     ^^^^^^^^^^
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions