about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2023-12-17skip rpit constraint check if borrowck return type errorbohan-0/+4
2023-12-17Auto merge of #119000 - celinval:smir-cstr, r=ouz-abors-0/+15
Add a method to StableMIR to check if a type is a CStr Also add a check that StableMIR works properly with C string literal.
2023-12-17fix diagnostic regresssionAli MJ Al-Nasrawy-7/+12
2023-12-17use Vec for region constraintsAli MJ Al-Nasrawy-21/+22
2023-12-17Auto merge of #118830 - GuillaumeGomez:env-tracked_env, r=Nilstriebbors-0/+4
Add support for `--env` on `tracked_env::var` Follow-up of https://github.com/rust-lang/rust/pull/118368. Part of Part of https://github.com/rust-lang/rust/issues/80792. It adds support of the `--env` option for proc-macros through `tracked_env::var`. r? `@Nilstrieb`
2023-12-16Auto merge of #110494 - majaha:noTrapAfterNoreturn, r=nikicbors-0/+8
Use the LLVM option NoTrapAfterNoreturn Use this LLVM option: https://llvm.org/doxygen/classllvm_1_1TargetOptions.html#acd83fce25de1ac9f6c975135a8235c22 when TrapUnreachable is enabled. This prevents codegenning unnecessary double-traps in some situations. See further discussion here: https://github.com/rust-lang/compiler-team/issues/618
2023-12-16Remove unnecessary constness from ProjectionCandidateMichael Goulet-19/+12
2023-12-16Auto merge of #118897 - nnethercote:more-unescaping-cleanups, r=fee1-deadbors-88/+82
More unescaping cleanups More minor improvements I found while working on #118699. r? `@fee1-dead`
2023-12-15Rollup merge of #119004 - matthiaskrgr:conv, r=compiler-errorsJubilee-41/+25
NFC don't convert types to identical types
2023-12-15Rollup merge of #119003 - matthiaskrgr:nein_clone, r=NadrierilJubilee-6/+6
NFC: do not clone types that are copy
2023-12-15Rollup merge of #118993 - jyn514:cfg-color, r=WaffleLapkin,NilstriebJubilee-4/+1
use `if cfg!` instead of `#[cfg]` this pr is specifically for waffle because i love it <3 fixes https://github.com/rust-lang/rust/pull/118756#discussion_r1421767649 r? `@WaffleLapkin`
2023-12-15Rollup merge of #118989 - compiler-errors:lint-decorator-2, r=WaffleLapkinJubilee-68/+17
Simplify lint decorator derive too See last commit, since this is stacked on top of #118727. r? WaffleLapkin
2023-12-16Simplify lint decorator derive tooMichael Goulet-68/+17
2023-12-16Remove the lint outrightMichael Goulet-8/+5
2023-12-16Make IMPLIED_BOUNDS_ENTAILMENT into a hard error from a lintMichael Goulet-224/+13
2023-12-16coverage: Avoid creating `func_coverage` for marker statementsZalathar-3/+11
Coverage marker statements should have no effect on codegen, but in some cases they could have the side-effect of creating a `func_coverage` entry for their enclosing function. That can lead to an ICE for functions that don't actually have any coverage spans.
2023-12-16coverage: Skip instrumenting a function if no spans were extractedZalathar-4/+15
2023-12-15NFC don't convert types to identical typesMatthias Krüger-41/+25
2023-12-15NFC: do not clone types that are copyMatthias Krüger-6/+6
2023-12-15Rollup merge of #118981 - krtab:onelessalloc, r=compiler-errorsJubilee-1/+1
Remove an unneeded allocation This removes an unneeded allocation in `<&[hir::GenericParam<'_>] as NextTypeParamName>::next_type_param_name`
2023-12-15Rollup merge of #118727 - compiler-errors:lint-decorate, r=WaffleLapkinJubilee-124/+42
Don't pass lint back out of lint decorator Change the decorator function in the signature of the `emit_lint`/`span_lint`/etc family of methods from `impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>) -> &'b mut DiagnosticBuilder<'a, ()>` to `impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>)`. I consider it easier to read this way, especially when there's control flow involved. r? nnethercote though feel free to reassign
2023-12-15Rollup merge of #118396 - compiler-errors:ast-lang-items, r=cjgillotJubilee-364/+414
Collect lang items from AST, get rid of `GenericBound::LangItemTrait` r? `@cjgillot` cc #115178 Looking forward, the work to remove `QPath::LangItem` will also be significantly more difficult, but I plan on doing it as well. Specifically, we have to change: 1. A lot of `rustc_ast_lowering` for things like expr `..` 2. A lot of astconv, since we actually instantiate lang and non-lang paths quite differently. 3. A ton of diagnostics and clippy lints that are special-cased via `QPath::LangItem` Meanwhile, it was pretty easy to remove `GenericBound::LangItemTrait`, so I just did that here.
2023-12-15Add a method to check if type is a CStrCelina G. Val-0/+15
2023-12-15Auto merge of #118996 - matthiaskrgr:rollup-n6x2lc7, r=matthiaskrgrbors-43/+44
Rollup of 7 pull requests Successful merges: - #117824 (Stabilize `ptr::{from_ref, from_mut}`) - #118234 (Stabilize `type_name_of_val`) - #118944 (Move type relations into submodule `relate` in rustc_infer, and notify when it has changed) - #118977 (Simplify `src-script.js` code) - #118985 (Remove `@JohnTitor` from diagnostics pings) - #118986 (Simplify JS code a little bit) - #118988 (rustdoc: add regression test for JS data file loading) r? `@ghost` `@rustbot` modify labels: rollup
2023-12-15use `if cfg` instead of `#[cfg]`jyn-4/+1
this pr is specifically for waffle because i love it <3
2023-12-15Move nll_relate to relate::nll submoduleMichael Goulet-5/+5
2023-12-15Add higher_ranked to relate submoduleMichael Goulet-8/+8
2023-12-15Move type relations into submodule in rustc_inferMichael Goulet-41/+42
2023-12-15Auto merge of #115165 - ↵bors-15/+47
davidtwco:issue-9228-describe-item-member-visibility, r=wesleywiser codegen_llvm: set `DW_AT_accessibility` Fixes #9228. Based on #74778. Sets the accessibility of types and fields in DWARF using `DW_AT_accessibility` attribute. `DW_AT_accessibility` (public/protected/private) isn't exactly right for Rust, but neither is `DW_AT_visibility` (local/exported/qualified), and there's no way to set `DW_AT_visbility` in LLVM's API. Debuggers will special-case the handling of these per-language anyway. r? `@wesleywiser` (visited in wg-debugging triage)
2023-12-15s/MatchCx/TypeCx/Nadrieril-48/+48
2023-12-15Fix enforcement of generics for associated itemsMichael Goulet-19/+85
2023-12-15Simplify instantiate_poly_trait_refMichael Goulet-75/+35
2023-12-15banish hir::GenericBound::LangItemTraitMichael Goulet-135/+68
2023-12-15Collect lang items from ASTMichael Goulet-155/+246
2023-12-15Fix commentsMichael Goulet-37/+3
2023-12-15Don't pass lint back out of lint decoratorMichael Goulet-87/+39
2023-12-15Introduce `MatchCtxt`Nadrieril-77/+93
2023-12-15s/PatCtxt/PlaceCtxt/Nadrieril-33/+33
2023-12-15`pattern_analysis` doesn't need to know what spans areNadrieril-36/+39
2023-12-15Address review commentsNadrieril-12/+4
2023-12-15s/RustcCtxt/RustcMatchCheckCtxt/Nadrieril-38/+48
2023-12-15Make the crate compile on stableNadrieril-3/+17
2023-12-15Make `rustc_index::bit_set` available on stableNadrieril-12/+37
2023-12-15Make the `rustc_data_structures` dependency optionalNadrieril-13/+28
2023-12-15Gate rustc-specific code under a featureNadrieril-16/+41
2023-12-15Iron out last rustc-specific detailsNadrieril-18/+43
2023-12-15Name rustc-specific things "rustc"Nadrieril-48/+42
2023-12-15Abstract `MatchCheckCtxt` into a traitNadrieril-239/+313
2023-12-15Disentangle the arena from `MatchCheckCtxt`Nadrieril-117/+140
2023-12-15Remove all matching on `ty.kind()` outside `cx`Nadrieril-36/+31