about summary refs log tree commit diff
path: root/src/test/codegen/integer-overflow.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-05-17 01:51:30 +0200
committerGitHub <noreply@github.com>2020-05-17 01:51:30 +0200
commitfc91043d243ec98cc9d5fb028a14f77a7d90f92b (patch)
tree60fa0fe1c882d18e698150cd1f4af8e9ec2b6772 /src/test/codegen/integer-overflow.rs
parentdd927a5b0f29342f7ad919fb52ca29510d2e7362 (diff)
parentbea2c59ea56cb3daa7e3bacabd7c95f002f9aca0 (diff)
downloadrust-fc91043d243ec98cc9d5fb028a14f77a7d90f92b.tar.gz
rust-fc91043d243ec98cc9d5fb028a14f77a7d90f92b.zip
Rollup merge of #72233 - dtolnay:literal, r=petrochenkov
Fix {:#?} representation of proc_macro::Literal

Before:

```rust
TokenStream [
    Ident {
        ident: "name",
        span: #0 bytes(37..41),
    },
    Punct {
        ch: '=',
        spacing: Alone,
        span: #0 bytes(42..43),
    },
    Literal { lit: Lit { kind: Str, symbol: "SNPP", suffix: None }, span: Span { lo: BytePos(44), hi: BytePos(50), ctxt: #0 } },
    Punct {
        ch: ',',
        spacing: Alone,
        span: #0 bytes(50..51),
    },
    Ident {
        ident: "owner",
        span: #0 bytes(56..61),
    },
    Punct {
        ch: '=',
        spacing: Alone,
        span: #0 bytes(62..63),
    },
    Literal { lit: Lit { kind: Str, symbol: "Canary M Burns", suffix: None }, span: Span { lo: BytePos(64), hi: BytePos(80), ctxt: #0 } },
]
```

After:

```rust
TokenStream [
    Ident {
        ident: "name",
        span: #0 bytes(37..41),
    },
    Punct {
        ch: '=',
        spacing: Alone,
        span: #0 bytes(42..43),
    },
    Literal {
        kind: Str,
        symbol: "SNPP",
        suffix: None,
        span: #0 bytes(44..50),
    },
    Punct {
        ch: ',',
        spacing: Alone,
        span: #0 bytes(50..51),
    },
    Ident {
        ident: "owner",
        span: #0 bytes(56..61),
    },
    Punct {
        ch: '=',
        spacing: Alone,
        span: #0 bytes(62..63),
    },
    Literal {
        kind: Str,
        symbol: "Canary M Burns",
        suffix: None,
        span: #0 bytes(64..80),
    },
]
```
Diffstat (limited to 'src/test/codegen/integer-overflow.rs')
0 files changed, 0 insertions, 0 deletions