Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
677357d
Fix typos in compiler
DaniPopes Apr 10, 2023
f06640d
Update ty_utils_never_to_any_not_supported diagnostic message
DaniPopes Apr 10, 2023
40f12c6
Revert method-not-found-generic-arg-elision test bless
DaniPopes Apr 10, 2023
24cbf81
Remove `..` from return type notation
compiler-errors Apr 10, 2023
5716ae6
Introduce `Region::get_name_or_anon`.
nnethercote Apr 11, 2023
1eb5390
Fix `RegionCtxt::preference_value`.
nnethercote Apr 11, 2023
bd7f301
Use the existing `static` and `env` symbols instead of interning.
nnethercote Apr 11, 2023
7975779
Add `sym::anon`.
nnethercote Apr 11, 2023
4b456cb
compiler: improve captured metavariables diagnostic
lovelymono Apr 12, 2023
04f20d4
compiler: print the suggestion only for local macros
lovelymono Apr 12, 2023
e0ed174
tidy: Issue an error when ui test limits are too high
clubby789 Apr 12, 2023
ad9a89e
rustdoc: make settings radio and checks thicker, less contrast
notriddle Apr 11, 2023
f263f88
Split out a separate feature gate for impl trait in associated types
oli-obk Apr 12, 2023
bb7ed64
rustdoc: use CSS `overscroll-behavior` instead of JavaScript
notriddle Apr 10, 2023
331e7c3
Rollup merge of #110153 - DaniPopes:compiler-typos, r=Nilstrieb
matthiaskrgr Apr 12, 2023
05e67b5
Rollup merge of #110165 - notriddle:notriddle/overscroll-behavior, r=…
matthiaskrgr Apr 12, 2023
b4734f0
Rollup merge of #110175 - nnethercote:symbol-cleanups, r=jackh726
matthiaskrgr Apr 12, 2023
a34bcd7
Rollup merge of #110203 - compiler-errors:rtn-dots, r=eholk
matthiaskrgr Apr 12, 2023
b53817d
Rollup merge of #110205 - notriddle:notriddle/pixelated-border, r=Gui…
matthiaskrgr Apr 12, 2023
d54a8ac
Rollup merge of #110222 - lovelymono:rustc-expand-mbe-diagnostic, r=d…
matthiaskrgr Apr 12, 2023
214e4ef
Rollup merge of #110237 - oli-obk:impl_trait_in_assoc_tys, r=jackh726
matthiaskrgr Apr 12, 2023
4844164
Rollup merge of #110241 - clubby789:tidy-reduce-limit, r=albertlarsan68
matthiaskrgr Apr 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add sym::anon.
  • Loading branch information
nnethercote committed Apr 11, 2023
commit 79757799185515835306e11bec35b3fd3887ee70
5 changes: 1 addition & 4 deletions compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1339,14 +1339,11 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
};
let (sig, map) = tcx.replace_late_bound_regions(sig, |br| {
use crate::renumber::{BoundRegionInfo, RegionCtxt};
use rustc_span::Symbol;

let region_ctxt_fn = || {
let reg_info = match br.kind {
ty::BoundRegionKind::BrAnon(Some(span)) => BoundRegionInfo::Span(span),
ty::BoundRegionKind::BrAnon(..) => {
BoundRegionInfo::Name(Symbol::intern("anon"))
}
ty::BoundRegionKind::BrAnon(..) => BoundRegionInfo::Name(sym::anon),
ty::BoundRegionKind::BrNamed(_, name) => BoundRegionInfo::Name(name),
ty::BoundRegionKind::BrEnv => BoundRegionInfo::Name(sym::env),
};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/type_check/relate_tys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl<'tcx> TypeRelatingDelegate<'tcx> for NllTypeRelatingDelegate<'_, '_, 'tcx>

let reg_info = match placeholder.bound.kind {
ty::BoundRegionKind::BrAnon(Some(span)) => BoundRegionInfo::Span(span),
ty::BoundRegionKind::BrAnon(..) => BoundRegionInfo::Name(Symbol::intern("anon")),
ty::BoundRegionKind::BrAnon(..) => BoundRegionInfo::Name(sym::anon),
ty::BoundRegionKind::BrNamed(_, name) => BoundRegionInfo::Name(name),
ty::BoundRegionKind::BrEnv => BoundRegionInfo::Name(sym::env),
};
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/universal_regions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use rustc_infer::infer::NllRegionVariableOrigin;
use rustc_middle::ty::fold::TypeFoldable;
use rustc_middle::ty::{self, InlineConstSubsts, InlineConstSubstsParts, RegionVid, Ty, TyCtxt};
use rustc_middle::ty::{InternalSubsts, SubstsRef};
use rustc_span::symbol::kw;
use rustc_span::symbol::{kw, sym};
use rustc_span::Symbol;
use std::iter;

Expand Down Expand Up @@ -783,7 +783,7 @@ impl<'cx, 'tcx> InferCtxtExt<'tcx> for BorrowckInferCtxt<'cx, 'tcx> {
let region_vid = {
let name = match br.kind.get_name() {
Some(name) => name,
_ => Symbol::intern("anon"),
_ => sym::anon,
};

self.next_nll_region_var(origin, || RegionCtxt::Bound(BoundRegionInfo::Name(name)))
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ impl<'tcx> Region<'tcx> {
pub fn get_name_or_anon(self) -> Symbol {
match self.get_name() {
Some(name) => name,
None => Symbol::intern("anon"),
None => sym::anon,
}
}

Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ symbols! {
always,
and,
and_then,
anon,
anonymous_lifetime_in_impl_trait,
any,
append_const_msg,
Expand Down