Commit Graph

27 Commits

Author SHA1 Message Date
Joshua Nelson
c6004a5d3b Remove rustfmt tests from top-level .gitattributes
These are tracked in src/tools/rustfmt/.gitattributes already, they
don't need to be listed twice.
2021-06-04 09:04:54 -04:00
Caleb Cartwright
0e61f62bb5 add rustfmt crlf files to root gitattributes 2021-05-14 21:52:28 -05:00
Camelid
b3ae90b4c2
Tell GitHub to highlight config.toml.example as TOML
This should be a nice small quality of life improvement when looking at
`config.toml.example` on GitHub or looking at diffs of it in PRs.
2021-03-23 17:20:12 -07:00
Jethro Beekman
b1de9d4b64 Fix gitattibutes for old git versions 2021-03-17 17:34:12 +01:00
Julian Frimmel
ff8717b56d Specify *.woff2 files as binary
This prevents older git versions to change the "line endings".
2021-03-15 20:14:56 +01:00
Camelid
614a748b9c Highlight MIR as Rust on GitHub 2020-11-17 14:16:18 -08:00
bjorn3
39046172ab Nicer hunk headers for rust files
I found this trick at
<https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more>

Before the hunk headers for changes in methods would refer to the impl:

```diff
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 1c6937e685c..fa4264d729b 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -678,7 +678,7 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TypeckResults<'tcx> {
             ref closure_captures,
             ref generator_interior_types,
         } = *self;
-
+        // foo
         hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
             type_dependent_defs.hash_stable(hcx, hasher);
             field_indices.hash_stable(hcx, hasher);
```

After the hunk headers refer to the actual function signature:

```diff
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 1c6937e685c..fa4264d729b 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -678,7 +678,7 @@ fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHas
             ref closure_captures,
             ref generator_interior_types,
         } = *self;
-
+        // foo
         hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
             type_dependent_defs.hash_stable(hcx, hasher);
             field_indices.hash_stable(hcx, hasher);
```

When the function signature is visible, it will use the function
signature of the previous method as hunk header:

```diff
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index 1c6937e685c..63058dfc837 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -992,6 +992,7 @@ pub fn typeck_opt_const_arg(
     }

     pub fn alloc_steal_mir(self, mir: Body<'tcx>) -> &'tcx Steal<Body<'tcx>> {
+        // foo
         self.arena.alloc(Steal::new(mir))
     }
```
2020-11-08 16:46:53 +01:00
Alex Crichton
815ce8cb1d Allow git to merge Cargo.lock
This commit backs out  in order to fully leverage  where
`git` should be able to merge `Cargo.lock` nowadays with only minimal
conflicts.
2019-08-20 06:56:46 -07:00
Pietro Albini
645b7c2c36
ignore images line ending on older git versions
On Ubuntu 16.04 git 2.7.4 tries to fix the line ending of .png and .ico
files, and obviously it ruins them. This commit adds an attribute to
those files to properly mark them as binary.
2019-01-23 12:44:15 +01:00
Manish Goregaokar
287ad5407a Mark .fixed files as Rust syntax for GitHub 2018-05-28 11:36:13 +02:00
kennytm
2d46b9032a
GitHub: Stop treating Cargo.lock as a generated file.
We do want to inspect the changes to Cargo.lock, hiding the diff by default
would miss important details like
https://github.com/rust-lang/rust/pull/50629#discussion_r187556602
2018-05-16 23:49:58 +08:00
Oliver Schneider
77faf79c0e
Do not automatically merge Cargo.lock 2017-12-06 15:41:46 +01:00
Steve Klabnik
2b2c62bc5b fix gitattributes for vendor 2017-02-13 13:41:13 -05:00
Alex Crichton
f3dfcae202 rustbuild: Start building --enable-extended
This commit adds a new flag to the configure script,
`--enable-extended`, which is intended for specifying a desire to
compile the full suite of Rust tools such as Cargo, the RLS, etc. This
is also an indication that the build system should create combined
installers such as the pkg/exe/msi artifacts.

Currently the `--enable-extended` flag just indicates that combined
installers should be built, and Cargo is itself not compiled just yet
but rather only downloaded from its location. The intention here is to
quickly get to feature parity with the current release process and then
we can start improving it afterwards.

All new files in this PR inside `src/etc/installer` are copied from the
rust-packaging repository.
2017-01-24 14:48:03 -08:00
Alex Crichton
31a8638e5e rustbuild: Tweak for vendored dependencies
A few changes are included here:

* The `winapi` and `url` dependencies were dropped. The source code for these
  projects is pretty weighty, and we're about to vendor them, so let's not
  commit to that intake just yet. If necessary we can vendor them later but for
  now it shouldn't be necessary.

* The `--frozen` flag is now always passed to Cargo, obviating the need for
  tidy's `cargo_lock` check.

* Tidy was updated to not check the vendor directory

Closes 
2016-11-08 07:32:05 -08:00
Alex Crichton
cf1ff56f3c std: Remove msvc/valgrind headers
These aren't really used for anything any more, so there doesn't seem to be much
reason to leave them around in the `rt` directory. There was some limiting of
threads spawned or tests when run under valgrind, but very little is run under
valgrind nowadays so there's also no real use keeping these around.
2015-07-27 16:21:15 -07:00
Adrien Tétar
4d5f4ff5e9 webfonts: proper fix 2014-07-08 20:29:36 +02:00
Daniel Micay
f1735cefcf make sure jemalloc valgrind support is enabled
This requires pointing it at the valgrind headers we carry in-tree.
2014-05-11 20:05:22 -04:00
Daniel Micay
87b658cf72 gitattributes: rm obsolete jemalloc entry 2014-05-10 19:58:17 -04:00
Alex Crichton
bec333c4bc dist: Tweak the OSX pkg installer
This performs a few touch-ups to the OSX installer:

* A rust logo is shown during installation
* The installation happens to /usr/local by default (instead of /)
* A new welcome screen is shown that's slightly more relevant
2014-03-28 18:29:29 -07:00
Daniel Micay
f766acad62 drop the linenoise library
Closes 
2013-10-16 22:57:51 -04:00
Felix S. Klock II
ee74ccb101 stop fighting with rust logo filetype. 2013-09-25 23:52:08 +02:00
Daniel Micay
9e3258e51f restore auto-detection of text files
We force the usage of LF line endings, but *only* in text files.
2013-09-19 19:06:05 -04:00
adridu59
62991e6047 gitattributes: force LF line endings for all files
This avoids default CRLF on msysgit for Windows which can cause trouble.
Cf. https://help.github.com/articles/dealing-with-line-endings#text-eollf

Commit dad2ccc9b3 followup.
Closes .
2013-09-16 17:16:33 +02:00
Mukilan Thiagarajan
dad2ccc9b3 Force line ending of '.in' files in jemalloc to LF
This fixes issue  . On Windows, if the git option core.autocrlf is true (github recommends users to turn on this flag - see https://help.github.com/articles/dealing-with-line-endings), the headers generated from the .in files will have syntatic errors, causing compilation to fail.
2013-08-24 22:20:20 +05:30
Daniel Micay
cff203ef76 add jemalloc to the runtime 2013-06-01 10:45:11 -04:00
Daniel Micay
86efd97a10 add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00