diff options
| author | Ayaz Hafiz <ayaz.hafiz.1@gmail.com> | 2020-06-22 20:52:44 -0700 |
|---|---|---|
| committer | Ayaz Hafiz <ayaz.hafiz.1@gmail.com> | 2020-06-22 20:52:44 -0700 |
| commit | 7930f9a368c055db249a0378c1533aaedc7b037b (patch) | |
| tree | 51293412f40fa8685e7b20bfd933942edcac8a7f /src/libstd/sys/unix/stack_overflow.rs | |
| parent | cbf356a1a5677b1c073f09ba833d8247c7ed01aa (diff) | |
| download | rust-7930f9a368c055db249a0378c1533aaedc7b037b.tar.gz rust-7930f9a368c055db249a0378c1533aaedc7b037b.zip | |
Change heuristic for determining range literal
Currently, rustc uses a heuristic to determine if a range expression is not a literal based on whether the expression looks like a function call or struct initialization. This fails for range literals whose lower/upper bounds are the results of function calls. A possibly-better heuristic is to check if the expression contains `..`, required in range literals. Of course, this is also not perfect; for example, if the range expression is a struct which includes some text with `..` this will fail, but in general I believe it is a better heuristic. A better alternative altogether is to add the `QPath::LangItem` enum variant suggested in #60607. I would be happy to do this as a precursor to this patch if someone is able to provide general suggestions on how usages of `QPath` need to be changed later in the compiler with the `LangItem` variant. Closes #73553
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
