170,461 matches across 25 files for error
snippet_mode: grep · sorted by relevance
1---
2▶name: Internal Compiler Error
3about: Create a report for an internal compiler error in rustc.
4labels: C-bug, I-ICE, T-compiler
· · ·
3▶about: Create a report for an internal compiler error in rustc.
4labels: C-bug, I-ICE, T-compiler
5title: "[ICE]: "
· · ·
6---
7<!--
8▶Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide
9a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
10how to create smaller examples.
· · ·
30```
31
32▶### Error output
33
34```
1▶name: Internal Compiler Error (for use by automated tooling)
2description: For now, you'll want to use the other ICE template, as GitHub forms have strict limits on the size of fields so backtraces cannot be pasted directly.
3labels: ["C-bug", "I-ICE", "T-compiler"]
· · ·
7 attributes:
8 value: |
9▶ Thank you for finding an Internal Compiler Error! 🧊
10
11 If possible, try to provide a minimal verifiable example.
· · ·
58 id: output
59 attributes:
60▶ label: Current error output
61 description: Please provide the `rustc` output you see
62 placeholder: output
15-->
16
17▶This is the **tracking issue** for the `YOUR_LINT_NAME_HERE` future-compatibility warning and other related errors. The goal of this page is to describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our [breaking change policy guidelines][guidelines].
18
19[guidelines]: https://rustc-dev-guide.rust-lang.org/bug-fix-procedure.html
· · ·
37*Give some recommendations on how a user can avoid the lint.*
38
39▶### When will this warning become a hard error?
40
41*If known, describe the future plans. For example, how long you anticipate this being a warning, or if there are other factors that will influence the anticipated closure.*
· · ·
46- [ ] Raise lint level to deny
47- [ ] Change the lint to report in dependencies
48▶- [ ] Switch to a hard error
49
50### Implementation history
93 SCCACHE_REGION: us-west-1
94 CACHE_DOMAIN: ci-caches.rust-lang.org
95▶ continue-on-error: ${{ matrix.continue_on_error || false }}
96 strategy:
97 # If the user starts multiple jobs in a try build, let them all finish.
· · ·
140 # Actions build on its own, so a hint in the log message is needed to
141 # point it in the right direction.
142▶ - name: configure the PR in which the error message will be posted
143 run: echo "[CI_PR_NUMBER=$num]"
144 env:
· · ·
272 # adding the condition is helpful as this way CI will not silently skip
273 # deploying artifacts from a dist builder if the variables are misconfigured,
274▶ # erroring about invalid credentials instead.
275 if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
276
· · ·
278 # This step is not critical, and if some I/O problem happens, we don't want
279 # to cancel the build.
280▶ continue-on-error: true
281 run: |
282 if [ -f build/metrics.json ]; then
· · ·
300 # This step is not critical, and if some I/O problem happens, we don't want
301 # to cancel the build.
302▶ continue-on-error: true
303 if: needs.calculate_matrix.outputs.run_type != 'pr'
304 env:
40 WAITING_ON_BORS=$(echo "$JSON" | jq '.labels[] | any(.name == "S-waiting-on-bors"; .)')
41
42▶ # Exit with error if open and S-waiting-on-bors
43 if [[ "$STATE" == "OPEN" && "$WAITING_ON_BORS" == "true" ]]; then
44 exit 1
· · ·
127 id: edit
128 # Don't fail job if we need to open new PR
129▶ continue-on-error: true
130 env:
131 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
· · ·
132 run: |
133▶ # Exit with error if PR is closed
134 STATE=$(gh pr view cargo_update --repo $GITHUB_REPOSITORY --json state --jq '.state')
135 if [[ "$STATE" != "OPEN" ]]; then
226the instructions in step 2 to get them on PATH.
227
228▶Using Windows native Python can be helpful if you get errors when building LLVM.
229You may also want to use Git for Windows, as it is often *much* faster. Turning
230off real-time protection in the Windows Virus & Threat protections settings can
323 WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
324 PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
325▶ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
326 KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
327 ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
110-------------------
111- [Array coercions may now result in less inference constraints than before](https://github.com/rust-lang/rust/pull/140283)
112▶- Importing `$crate` without renaming, i.e. `use $crate::{self};`, is now no longer permitted due to stricter error checking for `self` imports.
113- [const-eval: be more consistent in the behavior of padding during typed copies.](https://github.com/rust-lang/rust/pull/148967)
114 In very rare cases, this may cause compilation errors due to bytes from parts of a pointer ending up in the padding bytes of a `const` or `static`.
· · ·
114▶ In very rare cases, this may cause compilation errors due to bytes from parts of a pointer ending up in the padding bytes of a `const` or `static`.
115- [A future-incompatibility warning lint `ambiguous_glob_imported_traits` is now reported when using an ambiguously glob imported trait](https://github.com/rust-lang/rust/pull/149058)
116- [Check lifetime bounds of types mentioning only type parameters](https://github.com/rust-lang/rust/pull/149389)
· · ·
117▶- [Report more visibility-related ambiguous import errors](https://github.com/rust-lang/rust/pull/149596)
118- [Deprecate `Eq::assert_receiver_is_total_eq` and emit future compatibility warnings on manual impls](https://github.com/rust-lang/rust/pull/149978)
119- [powerpc64: Use the ELF ABI version set in target spec instead of guessing](https://github.com/rust-lang/rust/pull/150468) (fixes the ELF ABI used by the OpenBSD target)
· · ·
161- [Add warn-by-default `unused_visibilities` lint for visibility on `const _` declarations](https://github.com/rust-lang/rust/pull/147136)
162- [Update to Unicode 17](https://github.com/rust-lang/rust/pull/148321)
163▶- [Avoid incorrect lifetime errors for closures](https://github.com/rust-lang/rust/pull/148329)
164
165<a id="1.94.0-Platform-Support"></a>
· · ·
232 Some finer details of how precise closure captures get affected by pattern matching have been changed. In some cases, this can cause a non-move closure that was previously capturing an entire variable by move, to now capture only part of that variable by move, and other parts by borrow. This can cause the borrow checker to complain where it previously didn't, or cause `Drop` to run at a different point in time.
233- [Standard library macros are now imported via prelude, not via injected `#[macro_use]`](https://github.com/rust-lang/rust/pull/139493)
234▶ This will raise an error if macros of the same name are glob imported.
235 For example if a crate defines their own `matches` macro and then glob imports that,
236 it's now ambiguous whether the custom or standard library `matches` is meant and
+ 364 more matches in this file
358#
359# Under Windows this should be `yarn.cmd` or path to it (verified on nodejs v18.06), or
360▶# error will be emitted.
361#build.yarn = "yarn"
362
· · ·
773#rust.optimize-tests = true
774
775▶# Flag indicating whether codegen tests will be run or not. If you get an error
776# saying that the FileCheck executable is missing, you may want to disable this.
777# Also see the target's llvm-filecheck option.
· · ·
828
829# Whether to deny warnings in crates. Set to `false` to avoid
830▶# error: warnings are denied by `build.warnings` configuration
831#rust.deny-warnings = true
832
· · ·
833▶# Print backtrace on internal compiler errors during bootstrap
834#rust.backtrace-on-ice = false
835
· · ·
905#rust.std-features = ["panic_unwind"]
906
907▶# Trigger a `DebugBreak` after an internal compiler error during bootstrap on Windows
908#rust.break-on-ice = true
909
37 println!("cargo:rustc-link-arg-bin=rustc-main=/MANIFEST:EMBED");
38 println!("cargo:rustc-link-arg-bin=rustc-main=/MANIFESTINPUT:{}", manifest.to_str().unwrap());
39▶ // Turn linker warnings into errors.
40 println!("cargo:rustc-link-arg-bin=rustc-main=/WX");
41}
10rand_xoshiro = { version = "0.7.0", optional = true }
11rustc_data_structures = { path = "../rustc_data_structures", optional = true }
12▶rustc_error_messages = { path = "../rustc_error_messages", optional = true }
13rustc_errors = { path = "../rustc_errors", optional = true }
14rustc_hashes = { path = "../rustc_hashes" }
· · ·
13▶rustc_errors = { path = "../rustc_errors", optional = true }
14rustc_hashes = { path = "../rustc_hashes" }
15rustc_index = { path = "../rustc_index", default-features = false }
· · ·
27nightly = [
28 "dep:rustc_data_structures",
29▶ "dep:rustc_error_messages",
30 "dep:rustc_errors",
31 "dep:rustc_macros",
· · ·
30▶ "dep:rustc_errors",
31 "dep:rustc_macros",
32 "dep:rustc_serialize",
71 // convert to the ExternAbi that *shares a string* with this CanonAbi.
72 // FIXME: ideally we'd avoid printing `CanonAbi`, and preserve `ExternAbi` everywhere
73▶ // that we need to generate error messages.
74 let erased_abi = match self {
75 CanonAbi::C => ExternAbi::C { unwind: false },
106
107#[derive(Copy, Clone, Debug, PartialEq, Eq)]
108▶pub enum LayoutCalculatorError<F> {
109 /// An unsized type was found in a location where a sized type was expected.
110 ///
· · ·
111▶ /// This is not always a compile error, for example if there is a `[T]: Sized`
112 /// bound in a where clause.
113 ///
· · ·
134}
135
136▶impl<F> LayoutCalculatorError<F> {
137 pub fn without_payload(&self) -> LayoutCalculatorError<()> {
138 use LayoutCalculatorError::*;
· · ·
137▶ pub fn without_payload(&self) -> LayoutCalculatorError<()> {
138 use LayoutCalculatorError::*;
139 match *self {
· · ·
138▶ use LayoutCalculatorError::*;
139 match *self {
140 UnexpectedUnsized(_) => UnexpectedUnsized(()),
+ 15 more matches in this file
40#[cfg(feature = "nightly")]
41use std::iter::Step;
42▶use std::num::{NonZeroUsize, ParseIntError};
43use std::ops::{Add, AddAssign, Deref, Mul, RangeFull, RangeInclusive, Sub};
44use std::str::FromStr;
· · ·
48use rustc_data_structures::stable_hasher::StableOrd;
49#[cfg(feature = "nightly")]
50▶use rustc_error_messages::{DiagArgValue, IntoDiagArg};
51#[cfg(feature = "nightly")]
52use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, msg};
· · ·
52▶use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level, msg};
53use rustc_hashes::Hash64;
54use rustc_index::{Idx, IndexSlice, IndexVec};
· · ·
70pub use extern_abi::CVariadicStatus;
71pub use extern_abi::{ExternAbi, all_names};
72▶pub use layout::{FIRST_VARIANT, FieldIdx, LayoutCalculator, LayoutCalculatorError, VariantIdx};
73#[cfg(feature = "nightly")]
74pub use layout::{Layout, TyAbiInterface, TyAndLayout};
· · ·
327}
328
329▶pub enum TargetDataLayoutError<'a> {
330 InvalidAddressSpace { addr_space: &'a str, cause: &'a str, err: ParseIntError },
331 InvalidBits { kind: &'a str, bit: &'a str, cause: &'a str, err: ParseIntError },
+ 34 more matches in this file
32pub use rustc_span::AttrId;
33use rustc_span::{
34▶ ByteSymbol, DUMMY_SP, ErrorGuaranteed, Ident, Span, Spanned, Symbol, kw, respan, sym,
35};
36use thin_vec::{ThinVec, thin_vec};
· · ·
724
725 /// Whether this could be a never pattern, taking into account that a macro invocation can
726▶ /// return a never pattern. Used to inform errors during parsing.
727 pub fn could_be_never_pattern(&self) -> bool {
728 let mut could_be_never_pattern = false;
· · ·
741 }
742
743▶ /// Whether this contains a `!` pattern. This in particular means that a feature gate error will
744 /// be raised if the feature is off. Used to avoid gating the feature twice.
745 pub fn contains_never_pattern(&self) -> bool {
· · ·
948
949 /// Placeholder for a pattern that wasn't syntactically well formed in some way.
950▶ Err(ErrorGuaranteed),
951}
952
· · ·
956 /// `module::StructName { field, ..}`
957 Rest(Span),
958▶ /// `module::StructName { field, syntax error }`
959 Recovered(ErrorGuaranteed),
960 /// `module::StructName { field }`
+ 14 more matches in this file
602 AttrArgs::Eq { expr, .. } => match expr.kind {
603 ExprKind::Lit(token_lit) => {
604▶ // Turn failures to `None`, we'll get parse errors elsewhere.
605 MetaItemLit::from_token_lit(token_lit, expr.span)
606 .ok()
23#[derive(Clone, Copy, Eq, PartialEq, Encodable, Decodable, Debug, StableHash)]
24pub enum DiffMode {
25▶ /// No autodiff is applied (used during error handling).
26 Error,
27 /// The primal function which we will differentiate.
· · ·
26▶ Error,
27 /// The primal function which we will differentiate.
28 Source,
· · ·
113 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
114 match self {
115▶ DiffMode::Error => write!(f, "Error"),
116 DiffMode::Source => write!(f, "Source"),
117 DiffMode::Forward => write!(f, "Forward"),
· · ·
125/// Const is valid for all cases and means that we don't compute derivatives wrt. this output.
126/// That usually means we have a &mut or *mut T output and compute derivatives wrt. that arg,
127▶/// but this is too complex to verify here. Also it's just a logic error if users get this wrong.
128pub fn valid_ret_activity(mode: DiffMode, activity: DiffActivity) -> bool {
129 if activity == DiffActivity::None {
· · ·
132 }
133 match mode {
134▶ DiffMode::Error => false,
135 DiffMode::Source => false,
136 DiffMode::Forward => activity.is_dual_or_const(),
+ 2 more matches in this file
9use rustc_span::edition::Edition;
10use rustc_span::symbol::IdentPrintMode;
11▶use rustc_span::{DUMMY_SP, ErrorGuaranteed, Span, kw, sym};
12#[allow(clippy::useless_attribute)] // FIXME: following use of `hidden_glob_reexports` incorrectly triggers `useless_attribute` lint.
13#[allow(hidden_glob_reexports)]
· · ·
202 CStr,
203 CStrRaw(u8),
204▶ Err(ErrorGuaranteed),
205}
206
· · ·
302 ByteStr | ByteStrRaw(..) => "byte string",
303 CStr | CStrRaw(..) => "C string",
304▶ Err(_) => "error",
305 }
306 }
· · ·
580
581 /// Returns tokens that are likely to be typed accidentally instead of the current token.
582▶ /// Enables better error recovery when the wrong token is found.
583 pub fn similar_tokens(&self) -> &[TokenKind] {
584 match self {
· · ·
682 And | // reference
683 AndAnd | // double reference
684▶ // DotDotDot is no longer supported, but we need some way to display the error
685 DotDot | DotDotDot | DotDotEq | // range notation
686 Lt | Shl | // associated path
+ 1 more matches in this file