Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rolling up PRs in the queue #13290

Closed
wants to merge 15 commits into from
Closed

Conversation

alexcrichton
Copy link
Member

Closes #13285 (rustc: Stop using LLVMGetSectionName)
Closes #13280 (std: override clone_from for Vec.)
Closes #13277 (serialize: add a few missing pubs to base64)
Closes #13275 (Add and remove some ignore-win32 flags)
Closes #13273 (Removed managed boxes from libarena.)
Closes #13270 (Minor copy-editing for the tutorial)
Closes #13267 (fix Option<~ZeroSizeType>)
Closes #13265 (Update emacs mode to support new #![inner(attribute)] syntax.)
Closes #13263 (syntax: Remove AbiSet, use one Abi)

alexcrichton and others added 14 commits April 3, 2014 10:49
The recent pull request to remove libc from libstd has hit a wall in compiling
on windows, and I've been trying to investigate on the try bots as to why (it
compiles locally just fine). To the best of my knowledge, the LLVM section
iterator is behaving badly when iterating over the sections of the libc DLL.

Upon investigating the LLVMGetSectionName function in LLVM, I discovered that
this function doesn't always return a null-terminated string. It returns the
data pointer of a StringRef instance (LLVM's equivalent of &str essentially),
but it has no method of returning the length of the name of the section.

This commit modifies the section iteration when loading libraries to invoke a
custom LLVMRustGetSectionName which will correctly return both the length and
the data pointer.

I have not yet verified that this will fix landing liblibc, as it will require a
snapshot before doing a full test. Regardless, this is a worrisome situation
regarding the LLVM API, and should likely be fixed anyway.
The .def.in files haven't been necessary since the switch to static linking
awhile back.
A vector can reuse its allocation (and the allocations/resources of any
contained values) when cloning into an already-instantiated vector, so
we might as well do so.
Remove some statements that used to refer to similarities between `mod` and
`extern mod`, before the latter was renamed to `extern crate`.
There are actually three traits listed.
Note: "different to" is not exactly incorrect, but "different from" is more
commonly accepted in both US and Commonwealth English, and also more
consistent with other usage within this tutorial.
1778b63 provided the guarantee of no
`exchange_free` calls for ~ZeroSizeType, so a sentinel can now be used
without overhead.

Closes rust-lang#11998
This change removes the AbiSet from the AST, converting all usage to have just
one Abi value. The current scheme selects a relevant ABI given a list of ABIs
based on the target architecture and how relevant each ABI is to that
architecture.

Instead of this mildly complicated scheme, only one ABI will be allowed in abi
strings, and pseudo-abis will be created for special cases as necessary. For
example the "system" abi exists for stdcall on win32 and C on win64.

Closes rust-lang#10049
bors added a commit that referenced this pull request Apr 4, 2014
Closes #13285 (rustc: Stop using LLVMGetSectionName)
Closes #13280 (std: override clone_from for Vec.)
Closes #13277 (serialize: add a few missing pubs to base64)
Closes #13275 (Add and remove some ignore-win32 flags)
Closes #13273 (Removed managed boxes from libarena.)
Closes #13270 (Minor copy-editing for the tutorial)
Closes #13267 (fix Option<~ZeroSizeType>)
Closes #13265 (Update emacs mode to support new `#![inner(attribute)]` syntax.)
Closes #13263 (syntax: Remove AbiSet, use one Abi)
@bors bors closed this Apr 4, 2014
@alexcrichton alexcrichton deleted the rollup branch April 4, 2014 01:33
Manishearth pushed a commit to Manishearth/rust that referenced this pull request Nov 23, 2022
Support multiple targets for checkOnSave (in conjunction with cargo 1.64.0+)

This PR adds support for the ability to pass multiple `--target` flags when using
`cargo` 1.64.0+.

## Questions

I needed to change the type of two configurations options, but I did not plurialize the names to
avoid too much churn, should I ?

## Zulip thread

https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Issue.2013282.20.28supporting.20multiple.20targets.20with.201.2E64.2B.29

## Example

To see it working, on a macOS machine:

```sh
$ cd /tmp
$ cargo new cargo-multiple-targets-support-ra-test
$ cd !$
$ mkdir .cargo
$ echo '
[build]
target = [
    "aarch64-apple-darwin",
    "x86_64-apple-darwin",
]
' > .cargo/config.toml
$ echo '
fn main() {
    #[cfg(all(target_arch = "aarch64", target_os = "macos"))]
    {
        let a = std::fs::read_to_string("/tmp/test-read");
    }

    #[cfg(all(target_arch = "x86_64", target_os = "macos"))]
    {
        let a = std::fs::read_to_string("/tmp/test-read");
    }

    #[cfg(all(target_arch = "x86_64", target_os = "windows"))]
    {
        let a = std::fs::read_to_string("/tmp/test-read");
    }
}
' > src/main.rs
# launch your favorite editor with the version of RA from this PR
#
# You should see warnings under the first two `let a = ...` but not the third
```

## Screen

![Two panes of a terminal emulator, on the left pane is the main.rs file described above, with warnings for the first two let a = declaration, on the right pane is a display of the .cargo/config.toml, an ls of the current files in the directory and a call to cargo build to show the same warnings as in the editor on the left pane](https://user-images.githubusercontent.com/7951708/192122707-7a00606a-e581-4534-b9d5-b81c92694e8e.png)

Helps with rust-lang#13282
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2023
This fixes a regression introduced by rust-lang#13290, in which failing to set
`checkOnSave/target` (or `checkOnSave/targets`) would lead to an invalid
config.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 9, 2023
…et, r=jonas-schievink

Fix: Handle empty `checkOnSave/target` values

This fixes a regression introduced by rust-lang#13290, in which failing to set `checkOnSave/target` (or `checkOnSave/targets`) would lead to an invalid config.

[Fixes rust-lang#13660]
eopb added a commit to eopb/cargo that referenced this pull request Jan 14, 2024
Tracking Issue: [rust-lang#13290](rust-lang/rust#13290)

This change introduces the feature but does not yet attempt an implementation.
The actual implementation will happen in future PRs

r? @epage
Jarcho pushed a commit to Jarcho/rust that referenced this pull request Aug 24, 2024
`declare_interior_mutable_const`: Ignore pointer types.

fixes rust-lang#12951
fixes rust-lang#13233

changelog: `declare_interior_mutable_const`: Ignore pointer types.
Jarcho pushed a commit to Jarcho/rust that referenced this pull request Aug 26, 2024
`declare_interior_mutable_const`: Ignore pointer types.

fixes rust-lang#12951
fixes rust-lang#13233

changelog: `declare_interior_mutable_const`: Ignore pointer types.
Jarcho pushed a commit to Jarcho/rust that referenced this pull request Aug 26, 2024
`declare_interior_mutable_const`: Ignore pointer types.

fixes rust-lang#12951
fixes rust-lang#13233

changelog: `declare_interior_mutable_const`: Ignore pointer types.
MabezDev pushed a commit to esp-rs/rust that referenced this pull request Sep 3, 2024
`declare_interior_mutable_const`: Ignore pointer types.

fixes rust-lang#12951
fixes rust-lang#13233

changelog: `declare_interior_mutable_const`: Ignore pointer types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants