Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1a7132d
rustdoc-search: fix incorrect doc comment
notriddle Apr 14, 2023
4c11822
rustdoc: restructure type search engine to pick-and-use IDs
notriddle Apr 15, 2023
1ece1ea
Stablize raw-dylib, link_ordinal and -Cdlltool
dpaoliello Mar 27, 2023
b6f81e0
rustdoc-search: give longer notification for type corrections
notriddle Apr 19, 2023
e0a7462
rustdoc-search: clean up `checkIfInGenerics` call at end of `checkType`
notriddle Apr 20, 2023
7529d87
rustdoc-search: make type name correction choice deterministic
notriddle Apr 20, 2023
395840c
rustdoc-search: use more descriptive "x not found; y instead" message
notriddle Apr 20, 2023
d5e7ac5
avoid duplicating TLS state between test std and realstd
RalfJung Apr 28, 2023
ed468ee
Encode def span for foreign RPITITs
compiler-errors Apr 30, 2023
bc68de9
remove pointless `FIXME` in `bootstrap::download`
onur-ozkan May 1, 2023
6197e4d
Don't `use RibKind::*`
WaffleLapkin May 1, 2023
0fa5920
Remove "RibKind" suffix from `RibKind` variants
WaffleLapkin May 1, 2023
6edb4ca
Don't print backtrace on ICEs in `issue-86800.rs`.
nnethercote May 1, 2023
5f45c69
Improve filtering in `default-backtrace-ice.rs`.
nnethercote May 1, 2023
eb23f47
check array type of repeat exprs is wf
BoxyUwU May 2, 2023
6af761a
Add some triagebot notifications for nnethercote.
nnethercote May 2, 2023
51b9f78
Amend the triagebot comment for `Cargo.lock` changes.
nnethercote May 2, 2023
44613c1
Rollup merge of #109677 - dpaoliello:rawdylib, r=michaelwoerister,wes…
Dylan-DPC May 3, 2023
09666d7
Rollup merge of #110371 - notriddle:notriddle/search-corrections, r=G…
Dylan-DPC May 3, 2023
0b1d571
Rollup merge of #110946 - RalfJung:tls-realstd, r=m-ou-se
Dylan-DPC May 3, 2023
988c41f
Rollup merge of #111039 - compiler-errors:foreign-span-rpitit, r=tmiasko
Dylan-DPC May 3, 2023
68b605b
Rollup merge of #111052 - nnethercote:fix-ice-test, r=Nilstrieb
Dylan-DPC May 3, 2023
23eb9b1
Rollup merge of #111069 - ozkanonur:remove-pointless-fixme, r=albertl…
Dylan-DPC May 3, 2023
8d88f59
Rollup merge of #111070 - WaffleLapkin:break_ribs, r=lcnr
Dylan-DPC May 3, 2023
1831409
Rollup merge of #111100 - BoxyUwU:array_repeat_expr_wf, r=compiler-er…
Dylan-DPC May 3, 2023
5b16a2f
Rollup merge of #111112 - nnethercote:triagebot, r=compiler-errors
Dylan-DPC May 3, 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
Remove "RibKind" suffix from RibKind variants
  • Loading branch information
WaffleLapkin committed May 1, 2023
commit 0fa59204e5b70bcf473a4ca56ac8ceea362d7dff
56 changes: 28 additions & 28 deletions compiler/rustc_resolve/src/ident.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
}

module = match ribs[i].kind {
RibKind::ModuleRibKind(module) => module,
RibKind::Module(module) => module,
RibKind::MacroDefinition(def) if def == self.macro_def(ident.span.ctxt()) => {
// If an invocation of this macro created `ident`, give up on `ident`
// and switch to `ident`'s source from the macro definition.
Expand Down Expand Up @@ -1083,7 +1083,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
let ribs = &all_ribs[rib_index + 1..];

// An invalid forward use of a generic parameter from a previous default.
if let RibKind::ForwardGenericParamBanRibKind = all_ribs[rib_index].kind {
if let RibKind::ForwardGenericParamBan = all_ribs[rib_index].kind {
if let Some(span) = finalize {
let res_error = if rib_ident.name == kw::SelfUpper {
ResolutionError::SelfInGenericParamDefault
Expand All @@ -1103,14 +1103,14 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {

for rib in ribs {
match rib.kind {
RibKind::NormalRibKind
| RibKind::ClosureOrAsyncRibKind
| RibKind::ModuleRibKind(..)
RibKind::Normal
| RibKind::ClosureOrAsync
| RibKind::Module(..)
| RibKind::MacroDefinition(..)
| RibKind::ForwardGenericParamBanRibKind => {
| RibKind::ForwardGenericParamBan => {
// Nothing to do. Continue.
}
RibKind::ItemRibKind(_) | RibKind::AssocItemRibKind => {
RibKind::Item(_) | RibKind::AssocItem => {
// This was an attempt to access an upvar inside a
// named function item. This is not allowed, so we
// report an error.
Expand All @@ -1122,7 +1122,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
res_err = Some((span, CannotCaptureDynamicEnvironmentInFnItem));
}
}
RibKind::ConstantItemRibKind(_, item) => {
RibKind::ConstantItem(_, item) => {
// Still doesn't deal with upvars
if let Some(span) = finalize {
let (span, resolution_error) =
Expand Down Expand Up @@ -1151,13 +1151,13 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
}
return Res::Err;
}
RibKind::ConstParamTyRibKind => {
RibKind::ConstParamTy => {
if let Some(span) = finalize {
self.report_error(span, ParamInTyOfConstParam(rib_ident.name));
}
return Res::Err;
}
RibKind::InlineAsmSymRibKind => {
RibKind::InlineAsmSym => {
if let Some(span) = finalize {
self.report_error(span, InvalidAsmSym);
}
Expand All @@ -1173,18 +1173,18 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
Res::Def(DefKind::TyParam, _) | Res::SelfTyParam { .. } | Res::SelfTyAlias { .. } => {
for rib in ribs {
let has_generic_params: HasGenericParams = match rib.kind {
RibKind::NormalRibKind
| RibKind::ClosureOrAsyncRibKind
| RibKind::ModuleRibKind(..)
RibKind::Normal
| RibKind::ClosureOrAsync
| RibKind::Module(..)
| RibKind::MacroDefinition(..)
| RibKind::InlineAsmSymRibKind
| RibKind::AssocItemRibKind
| RibKind::ForwardGenericParamBanRibKind => {
| RibKind::InlineAsmSym
| RibKind::AssocItem
| RibKind::ForwardGenericParamBan => {
// Nothing to do. Continue.
continue;
}

RibKind::ConstantItemRibKind(trivial, _) => {
RibKind::ConstantItem(trivial, _) => {
let features = self.tcx.sess.features_untracked();
// HACK(min_const_generics): We currently only allow `N` or `{ N }`.
if !(trivial == ConstantHasGenerics::Yes
Expand Down Expand Up @@ -1225,8 +1225,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
}

// This was an attempt to use a type parameter outside its scope.
RibKind::ItemRibKind(has_generic_params) => has_generic_params,
RibKind::ConstParamTyRibKind => {
RibKind::Item(has_generic_params) => has_generic_params,
RibKind::ConstParamTy => {
if let Some(span) = finalize {
self.report_error(
span,
Expand All @@ -1252,15 +1252,15 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
Res::Def(DefKind::ConstParam, _) => {
for rib in ribs {
let has_generic_params = match rib.kind {
RibKind::NormalRibKind
| RibKind::ClosureOrAsyncRibKind
| RibKind::ModuleRibKind(..)
RibKind::Normal
| RibKind::ClosureOrAsync
| RibKind::Module(..)
| RibKind::MacroDefinition(..)
| RibKind::InlineAsmSymRibKind
| RibKind::AssocItemRibKind
| RibKind::ForwardGenericParamBanRibKind => continue,
| RibKind::InlineAsmSym
| RibKind::AssocItem
| RibKind::ForwardGenericParamBan => continue,

RibKind::ConstantItemRibKind(trivial, _) => {
RibKind::ConstantItem(trivial, _) => {
let features = self.tcx.sess.features_untracked();
// HACK(min_const_generics): We currently only allow `N` or `{ N }`.
if !(trivial == ConstantHasGenerics::Yes
Expand All @@ -1283,8 +1283,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
continue;
}

RibKind::ItemRibKind(has_generic_params) => has_generic_params,
RibKind::ConstParamTyRibKind => {
RibKind::Item(has_generic_params) => has_generic_params,
RibKind::ConstParamTy => {
if let Some(span) = finalize {
self.report_error(
span,
Expand Down
Loading