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

Rollup of 7 pull requests #129256

Closed
wants to merge 18 commits into from

Commits on Jul 23, 2024

  1. Suggest adding Result return type for associated method in E0277.

    For following:
    
    ```rust
    struct A;
    impl A {
        fn test4(&self) {
            let mut _file = File::create("foo.txt")?;
            //~^ ERROR the `?` operator can only be used in a method
        }
    ```
    Suggest:
    
    ```rust
    impl A {
        fn test4(&self) -> Result<(), Box<dyn std::error::Error>> {
            let mut _file = File::create("foo.txt")?;
            //~^ ERROR the `?` operator can only be used in a method
    
        Ok(())
        }
    }
    ```
    
    For rust-lang#125997
    surechen committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    b4b991e View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2024

  1. doc: std::env::var: Returns None for names with '=' or NUL byte

    The documentation incorrectly stated that std::env::var could return
    an error for variable names containing '=' or the NUL byte. Copy the
    correct documentation from var_os.
    
    var_os was fixed in Commit 8a7a665, Pull Request rust-lang#109894, which
    closed Issue rust-lang#109893.
    
    This documentation was incorrectly added in commit f2c0f29, which
    replaced a panic in var_os by returning None, but documented the
    change as "May error if ...".
    
    Reference the specific error values and link to them.
    evanj committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    d5a7c45 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2024

  1. Configuration menu
    Copy the full SHA
    9a9cf2f View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2024

  1. bootstrap: fix clean's remove_dir_all implementation

    ... by using `std::fs::remove_dir_all`, which handles a bunch of edge
    cases including read-only files and symlinks which are extremely tricky
    on Windows.
    jieyouxu committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    1687c55 View commit details
    Browse the repository at this point in the history
  2. move Build::update_submodule to Config::update_submodule

    During config parsing, some bootstrap logic (e.g., `download-ci-llvm`) checks certain sources
    and acts based on their state. This means that if path is a git submodule, bootstrap needs to
    update it before checking its state. Otherwise it may make incorrect assumptions by relying on
    outdated sources. To enable submodule updates during config parsing, we need to move the `update_submodule`
    function from the `Build` to `Config` instance, so we can access to it during the parsing process.
    
    Signed-off-by: onur-ozkan <[email protected]>
    onur-ozkan committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    c7832b8 View commit details
    Browse the repository at this point in the history
  3. bypass dry_run if the command is run_always

    Signed-off-by: onur-ozkan <[email protected]>
    onur-ozkan committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    3d0f3b2 View commit details
    Browse the repository at this point in the history
  4. sync llvm submodule during config parse

    Signed-off-by: onur-ozkan <[email protected]>
    onur-ozkan committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    1ca2708 View commit details
    Browse the repository at this point in the history
  5. code review improvements

    evanj committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    b0023f5 View commit details
    Browse the repository at this point in the history
  6. Typo

    smoelius authored Aug 18, 2024
    Configuration menu
    Copy the full SHA
    dc47665 View commit details
    Browse the repository at this point in the history
  7. Check that #[may_dangle] is properly applied

    It's only valid when applied to a type or lifetime parameter
    in `Drop` trait implementation.
    GoldsteinE committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    3a9bf45 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    df6cb95 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#128084 - surechen:fix_125997_v1, r=cjgillot

    Suggest adding Result return type for associated method in E0277.
    
    Recommit rust-lang#126515 because I messed up during rebase,
    
    Suggest adding Result return type for associated method in E0277.
    
    For following:
    
    ```rust
    struct A;
    impl A {
        fn test4(&self) {
            let mut _file = File::create("foo.txt")?;
            //~^ ERROR the `?` operator can only be used in a method
        }
    ```
    
    Suggest:
    
    ```rust
    impl A {
        fn test4(&self) -> Result<(), Box<dyn std::error::Error>> {
            let mut _file = File::create("foo.txt")?;
            //~^ ERROR the `?` operator can only be used in a method
    
        Ok(())
        }
    }
    ```
    
    For rust-lang#125997
    
    r? ````@cjgillot````
    matthiaskrgr authored Aug 18, 2024
    Configuration menu
    Copy the full SHA
    5ac1624 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#128902 - evanj:evan.jones/env-var-doc, r=wo…

    …rkingjubilee
    
    doc: std::env::var: Returns None for names with '=' or NUL byte
    
    The documentation incorrectly stated that std::env::var could return an error for variable names containing '=' or the NUL byte. Copy the correct documentation from var_os.
    
    var_os was fixed in Commit 8a7a665, Pull Request rust-lang#109894, which closed Issue rust-lang#109893.
    
    This documentation was incorrectly added in commit f2c0f29, which replaced a panic in var_os by returning None, but documented the change as "May error if ...".
    
    Reference the specific error values and link to them.
    matthiaskrgr authored Aug 18, 2024
    Configuration menu
    Copy the full SHA
    e9fe807 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#129187 - jieyouxu:squeaky-clean-windows-sym…

    …links, r=Kobzol
    
    bootstrap: fix clean's remove_dir_all implementation
    
    It turns out bootstrap's `clean.rs`'s hand-rolled `rm_rf` (which probably comes before `std::fs::remove_dir_all` was stable) is very broken on native Windows around both read-only files/directories and especially symbolic links. So instead of rolling our own, just use `std::fs::remove_dir_all`.
    
    This is a blocker for compiletest's own `rm_rf` implementation rust-lang#129155 which happens to be also buggy, which in turn is a blocker for the rmake.rs test port rust-lang#128562 that heavily exercises symlinks (I was reviewing rust-lang#128562 and testing it on native Windows which is how I found out).
    
    I also left a FIXME for `detect_src_and_out` due to a failing assertion on native Windows (opened rust-lang#129188):
    
    ```
    ---- core::config::tests::detect_src_and_out stdout ----
    thread 'core::config::tests::detect_src_and_out' panicked at src\core\config\tests.rs:72:13:
    assertion `left == right` failed
      left: "E:\\tmp"
     right: "C:\\tmp"
    ```
    
    Fixes rust-lang#112544 (because now we handle Windows symlinks properly).
    
    try-job: x86_64-msvc
    try-job: i686-mingw
    try-job: test-various
    try-job: armhf-gnu
    try-job: aarch64-apple
    try-job: aarch64-gnu
    matthiaskrgr authored Aug 18, 2024
    Configuration menu
    Copy the full SHA
    cba68a6 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#129194 - ChrisDenton:detect-src, r=Mark-Sim…

    …ulacrum
    
    Fix bootstrap test `detect_src_and_out` on Windows
    
    Fixes rust-lang#129188 by making sure it's properly testing the right path for the platform.
    matthiaskrgr authored Aug 18, 2024
    Configuration menu
    Copy the full SHA
    427cb70 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#129231 - onur-ozkan:improve-submodule-updat…

    …es, r=Mark-Simulacrum
    
    improve submodule updates
    
    During config parsing, some bootstrap logic (e.g., `download-ci-llvm`) checks certain sources (for `download-ci-llvm`, it's `src/llvm-project`) and acts based on their state. This means that if path is a git submodule, bootstrap needs to update it before checking its state. Otherwise it may make incorrect assumptions by relying on outdated sources. To enable submodule updates during config parsing, we need to move the `update_submodule` function from the `Build` to `Config`, so we can access to it during the parsing process.
    
    Closes rust-lang#122787
    matthiaskrgr authored Aug 18, 2024
    Configuration menu
    Copy the full SHA
    3f3230b View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#129235 - GoldsteinE:check-may-dangle, r=com…

    …piler-errors
    
    Check that `#[may_dangle]` is properly applied
    
    It's only valid when applied to a type or lifetime parameter in `Drop` trait implementation.
    
    Tracking issue: rust-lang#34761
    cc rust-lang#34761 (comment)
    matthiaskrgr authored Aug 18, 2024
    Configuration menu
    Copy the full SHA
    3d9a6ad View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#129245 - smoelius:patch-1, r=lqd

    Typo
    
    Fix a typo in a comment.
    matthiaskrgr authored Aug 18, 2024
    Configuration menu
    Copy the full SHA
    a9919ec View commit details
    Browse the repository at this point in the history