rust/src
Mazdak Farrokhzad 00cba5b092
Rollup merge of #64809 - davidtwco:issue-64768-target-feature-const, r=varkor
hir: Disallow `target_feature` on constants

Fixes #64768.

This PR fixes an ICE when `#[target_feature]` is applied to constants by disallowing this with the same error as when `#[target_feature]` is applied to other places it shouldn't be.

I couldn't see anything in the [RFC](https://github.com/rust-lang/rfcs/blob/master/text/2045-target-feature.md) that suggested that `#[target_feature]` should be applicable to constants or any tests that suggested it should, though I might have missed something - if this is desirable in future, it remains possible to remove this error (but for the time being, I think this error is better than an ICE).

I also added some extra cases to the test for other places where `#[target_feature]` should not be permitted.

cc @gnzlbg
2019-09-28 05:37:47 +02:00
..
bootstrap Switch version to 1.40 2019-09-25 08:20:32 -04:00
build_helper rustbuild: allow disabling deny(warnings) for bootstrap 2019-08-27 17:26:54 +02:00
ci Remove --enable-extended from cross dist builder 2019-09-23 09:34:44 -07:00
doc Delete iter-order-by.md 2019-09-23 11:57:07 +10:00
etc ignore-x86 instead of ignore-musl 2019-09-22 11:33:13 -07:00
grammar
liballoc Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
libarena
libcore Auto merge of #62661 - arielb1:never-reserve, r=nikomatsakis 2019-09-26 08:42:34 +00:00
libfmt_macros flatten rustc_lexer::character_properties module 2019-09-04 15:13:29 +03:00
libgraphviz
libpanic_abort
libpanic_unwind
libproc_macro Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
libprofiler_builtins
librustc Rollup merge of #64809 - davidtwco:issue-64768-target-feature-const, r=varkor 2019-09-28 05:37:47 +02:00
librustc_apfloat rustc_apfloat: make the crate #![no_std] explicitly. 2019-08-28 11:24:04 +03:00
librustc_asan Fix build script sanitizer check. 2019-09-13 20:59:46 -07:00
librustc_codegen_llvm Auto merge of #64813 - varkor:node-to-kind, r=Centril 2019-09-27 10:05:38 +00:00
librustc_codegen_ssa Auto merge of #64813 - varkor:node-to-kind, r=Centril 2019-09-27 10:05:38 +00:00
librustc_codegen_utils Auto merge of #64816 - Centril:rollup-gbeqot4, r=Centril 2019-09-26 20:29:40 +00:00
librustc_data_structures Auto merge of #64627 - nnethercote:ObligForest-even-more, r=nikomatsakis 2019-09-25 05:54:00 +00:00
librustc_driver -Z unpretty message: include expanded,hygiene 2019-09-27 19:54:25 +02:00
librustc_errors Rollup merge of #64721 - hman523:issue64447, r=estebank 2019-09-24 23:45:31 +02:00
librustc_fs_util
librustc_incremental Rename Item.node to Item.kind 2019-09-26 18:21:48 +01:00
librustc_interface don't borrowck::check_crate(tcx) anymore. 2019-09-27 19:48:06 +02:00
librustc_lexer fill metadata in rustc_lexer's Cargo.toml 2019-09-05 23:03:50 +03:00
librustc_lint Rename ForeignItem.node to ForeignItem.kind 2019-09-26 18:21:48 +01:00
librustc_llvm fix a few typos in comments 2019-09-04 23:25:51 +08:00
librustc_lsan Fix build script sanitizer check. 2019-09-13 20:59:46 -07:00
librustc_macros Remove global_tcx from TyCtxt 2019-09-27 13:33:48 -04:00
librustc_metadata Rename ForeignItem.node to ForeignItem.kind 2019-09-26 18:21:48 +01:00
librustc_mir Rollup merge of #64781 - Mark-Simulacrum:no-global-tcx, r=eddyb 2019-09-28 05:37:43 +02:00
librustc_msan Fix build script sanitizer check. 2019-09-13 20:59:46 -07:00
librustc_passes Rename ForeignItem.node to ForeignItem.kind 2019-09-26 18:21:48 +01:00
librustc_plugin Rename Item.node to Item.kind 2019-09-26 18:21:48 +01:00
librustc_privacy Rename Item.node to Item.kind 2019-09-26 18:21:48 +01:00
librustc_resolve Rename MetaItem.node to MetaItem.kind 2019-09-26 18:21:48 +01:00
librustc_save_analysis Rename ForeignItem.node to ForeignItem.kind 2019-09-26 18:21:48 +01:00
librustc_target Auto merge of #64254 - aleksijuvani:fix-macos-sysroot, r=alexcrichton 2019-09-13 09:19:43 +00:00
librustc_traits Remove lift_to_global 2019-09-27 13:33:50 -04:00
librustc_tsan Fix build script sanitizer check. 2019-09-13 20:59:46 -07:00
librustc_typeck Rollup merge of #64802 - estebank:walk-parents-iterator, r=matthewjasper 2019-09-28 05:37:46 +02:00
librustdoc Auto merge of #63937 - Nashenas88:rustdoc_57180, r=GuillaumeGomez 2019-09-27 13:51:25 +00:00
libserialize Tweak libserialize allows 2019-09-23 09:34:44 -07:00
libstd Rollup merge of #64703 - llogiq:slices-elems-are-equidistant, r=rkruppe 2019-09-28 05:37:40 +02:00
libsyntax Auto merge of #64813 - varkor:node-to-kind, r=Centril 2019-09-27 10:05:38 +00:00
libsyntax_ext Rename Item.node to Item.kind 2019-09-26 18:21:48 +01:00
libsyntax_pos reserve impl<T> From<!> for T 2019-09-24 21:11:50 +03:00
libterm bootstrap: Merge the libtest build step with libstd 2019-08-23 16:46:11 -07:00
libtest Include message on tests that should panic 2019-09-26 19:39:59 -04:00
libunwind
llvm-emscripten@7f23313edf
llvm-project@8adf9bdccf Update to LLVM 9.0.0 2019-09-20 09:36:03 -07:00
rtstartup
rustc
rustllvm
stdarch@e0ab2c165a Move --cfg bootstrap out of rustc.rs 2019-09-23 09:34:44 -07:00
test Rollup merge of #64809 - davidtwco:issue-64768-target-feature-const, r=varkor 2019-09-28 05:37:47 +02:00
tools submodules: update clippy from 68ff8b19 to edd90473 2019-09-27 19:08:47 +02:00
README.md
stage0.txt Switch version to 1.40 2019-09-25 08:20:32 -04:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc guide.

There is also useful content in this README: https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve.