Bump to 1.33.0
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
This commit is contained in:
parent
bd47d6825b
commit
cf47a19305
31 changed files with 47 additions and 63 deletions
|
@ -579,7 +579,7 @@ impl SourceMap {
|
|||
match self.span_to_prev_source(sp) {
|
||||
Err(_) => None,
|
||||
Ok(source) => source.split('\n').last().map(|last_line| {
|
||||
last_line.len() - last_line.trim_left().len()
|
||||
last_line.len() - last_line.trim_start().len()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ impl SourceMap {
|
|||
/// if no character could be found or if an error occurred while retrieving the code snippet.
|
||||
pub fn span_extend_to_prev_char(&self, sp: Span, c: char) -> Span {
|
||||
if let Ok(prev_source) = self.span_to_prev_source(sp) {
|
||||
let prev_source = prev_source.rsplit(c).nth(0).unwrap_or("").trim_left();
|
||||
let prev_source = prev_source.rsplit(c).nth(0).unwrap_or("").trim_start();
|
||||
if !prev_source.is_empty() && !prev_source.contains('\n') {
|
||||
return sp.with_lo(BytePos(sp.lo().0 - prev_source.len() as u32));
|
||||
}
|
||||
|
@ -613,7 +613,7 @@ impl SourceMap {
|
|||
for ws in &[" ", "\t", "\n"] {
|
||||
let pat = pat.to_owned() + ws;
|
||||
if let Ok(prev_source) = self.span_to_prev_source(sp) {
|
||||
let prev_source = prev_source.rsplit(&pat).nth(0).unwrap_or("").trim_left();
|
||||
let prev_source = prev_source.rsplit(&pat).nth(0).unwrap_or("").trim_start();
|
||||
if !prev_source.is_empty() && (!prev_source.contains('\n') || accept_newlines) {
|
||||
return sp.with_lo(BytePos(sp.lo().0 - prev_source.len() as u32));
|
||||
}
|
||||
|
@ -627,7 +627,7 @@ impl SourceMap {
|
|||
pub fn span_until_char(&self, sp: Span, c: char) -> Span {
|
||||
match self.span_to_snippet(sp) {
|
||||
Ok(snippet) => {
|
||||
let snippet = snippet.split(c).nth(0).unwrap_or("").trim_right();
|
||||
let snippet = snippet.split(c).nth(0).unwrap_or("").trim_end();
|
||||
if !snippet.is_empty() && !snippet.contains('\n') {
|
||||
sp.with_hi(BytePos(sp.lo().0 + snippet.len() as u32))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue