]> git.lizzy.rs Git - rust.git/commit
Use `Mode` less.
authorNicholas Nethercote <n.nethercote@gmail.com>
Thu, 3 Nov 2022 02:35:49 +0000 (13:35 +1100)
committerNicholas Nethercote <n.nethercote@gmail.com>
Thu, 3 Nov 2022 04:58:19 +0000 (15:58 +1100)
commit34b32b0dac9da3fad7861bdc2bad89d771172bb3
treea7917a88980232aac0e700871ad326269b215c96
parent84ca2c3bab370ee58ebd23050e9286e1d9e664b9
Use `Mode` less.

It's passed to numerous places where we just need an `is_byte` bool.
Passing the bool avoids the need for some assertions.

Also rename `is_bytes()` as `is_byte()`, to better match `Mode::Byte`,
`Mode::ByteStr`, and `Mode::RawByteStr`.
compiler/rustc_lexer/src/unescape.rs
compiler/rustc_parse/src/lexer/unescape_error_reporting.rs