Uh oh!
There was an error while loading. Please reload this page.
refactor lexer to use idiomatic borrowing - #62124
Conversation
matklad
commented
Jun 25, 2019
rust-highfive
commented
Jun 25, 2019
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
One thing I find confusing is fnname_from(&self,start:BytePos) -> ast::Name{debug!("taking an ident from {:?} to {:?}", start,self.pos);Symbol::intern(self.str_from(start))}It's not obvious that fnintern_from(&self,start:BytePos) -> Symbol{debug!("taking an ident from {:?} to {:?}", start,self.pos);Symbol::intern(self.str_from(start))}would be better? If so, it makes sense to do this in this PR as well |
@matklad In this case the symbols are not necessarily identifiers, so they shouldn't use |
matklad
commented
Jun 25, 2019
Makes sense, added the second commit with rename |
matklad
commented
Jun 25, 2019
... and replaced the few remaning usages of |
Uh oh!
There was an error while loading. Please reload this page.
Lexer uses Symbols for a lot of stuff, not only for identifiers, so the "name" terminology is just confusing.
petrochenkov
commented
Jun 25, 2019
@bors r+ |
bors
commented
Jun 25, 2019
📌 Commit 57db25e has been approved by |
refactor lexer to use idiomatic borrowing
refactor lexer to use idiomatic borrowing
Rollup of 8 pull requests Successful merges: - #60340 (Rename .cap() methods to .capacity()) - #61767 (Update new_debug_unreachable) - #62043 (Remove `FnBox`) - #62076 (Updated RELEASES.md for 1.36.0) - #62102 (call out explicitly that general read needs to be called with an initialized buffer) - #62104 (Inform the query system about properties of queries at compile time) - #62106 (Add more tests for async/await) - #62124 (refactor lexer to use idiomatic borrowing) Failed merges: r? @ghost
refactor lexer to use idiomatic borrowing
refactor lexer to use idiomatic borrowing
refactor lexer to use idiomatic borrowing
refactor lexer to use idiomatic borrowing
Rollup of 16 pull requests Successful merges: - #61878 (improve pinning projection docs) - #62043 (Remove `FnBox`) - #62067 (Add suggestion for missing `.await` keyword) - #62076 (Updated RELEASES.md for 1.36.0) - #62102 (call out explicitly that general read needs to be called with an initialized buffer) - #62106 (Add more tests for async/await) - #62124 (refactor lexer to use idiomatic borrowing) - #62131 (libsyntax: Fix some Clippy warnings) - #62152 (Don't ICE on item in `.await` expression) - #62154 (Remove old fixme) - #62155 (Add regression test for MIR drop generation in async loops) - #62156 (Update books) - #62160 (Remove outdated question_mark_macro_sep lint) - #62164 (save-analysis: use buffered writes) - #62171 (rustc: Retry SIGILL linker invocations) - #62176 (Update RLS) Failed merges: r? @ghost
No description provided.