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 26 pull requests #138382

Closed
wants to merge 108 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
01795b1
change definitely non-productive cycles to error
lcnr Feb 27, 2025
18809a2
keep inductive cycles as ambig in coherence
lcnr Feb 28, 2025
607987e
Support rmeta inputs for --crate-type=bin --emit=obj
sam-mccall Mar 7, 2025
a79f97b
Disentangle ForwardGenericParamBan and ConstParamTy ribs
compiler-errors Mar 9, 2025
1833737
uefi: fs: Implement FilePermission
Ayush1325 Mar 9, 2025
c717cc7
uefi: fs: Implement FileType
Ayush1325 Mar 9, 2025
e0a9dd3
uefi: fs: Partially implement FileAttr
Ayush1325 Mar 9, 2025
112f7b0
make precise capturing args in rustdoc Json typed
Kohei316 Mar 2, 2025
c9ccec9
Initial STD support for Cygwin
Berrysoft Dec 26, 2024
e3e98c8
Fix `std::sys::unix::set_linger` for Cygwin
Mar 4, 2024
1aad114
Fix building for cygwin
Berrysoft Dec 29, 2024
886fb15
Update metadata for cygwin target
Berrysoft Feb 25, 2025
abcbd88
Revert changes for rtstartup
Berrysoft Feb 25, 2025
d24c6a2
Fix code style
Berrysoft Feb 25, 2025
7d80aaa
Remove std::os::cygwin::raw
Berrysoft Mar 7, 2025
268e734
Impl cygwin rand with getrandom
Berrysoft Mar 7, 2025
c3051b1
Unify cygwin & horizon random impl
Berrysoft Mar 7, 2025
b9fe8de
Readd os::cygwin::raw as pub(crate)
Berrysoft Mar 7, 2025
c3c02a5
Use __xpg_strerror_r on cygwin
Berrysoft Mar 7, 2025
9cab8c2
Remove stack overflow handler for cygwin
Berrysoft Mar 7, 2025
87ca2db
Apply rustc-0023-Add-Trusty-OS-support-to-Rust-std.patch
randomPoison Feb 4, 2025
7f6ee12
Apply rustc-0054-Add-std-os-fd-support-for-Trusty.patch
randomPoison Feb 4, 2025
d633d8e
Format after patches have been applied
randomPoison Feb 4, 2025
22fea97
Disable unsupported tests
randomPoison Feb 4, 2025
5b94113
Update Trusty platform docs
randomPoison Feb 11, 2025
0b1a7ab
Remove custom TLS implementation for Trusty targets
randomPoison Feb 19, 2025
5d4ff50
Update books
rustbot Mar 10, 2025
f5dd3d1
Update Trusty support to account for recent libstd reorganization
randomPoison Mar 10, 2025
d75c973
main.js: insertAfter needs non-root referenceNode
lolbinarycat Mar 10, 2025
93161f5
main.js: don't set mouseMovedAfterSearch, as it is never read
lolbinarycat Mar 10, 2025
cf7f3cf
main.js: give type signatures to a few helper functions
lolbinarycat Mar 10, 2025
da5da99
main.js: handleEscape and handleShortcut accept KeyboardEvent
lolbinarycat Mar 10, 2025
6622111
main.js: always refer to searchState through window.searchState
lolbinarycat Mar 10, 2025
f5efd2a
main.js(isDisplayed): coerce truthy values to boolean
lolbinarycat Mar 10, 2025
ab180c2
main.js: handle document.activeElement being null
lolbinarycat Mar 10, 2025
2e1c8f0
rustdoc.d.ts: window.SIDEBAR_ITEMS may exist.
lolbinarycat Mar 10, 2025
749b6bf
rustdoc.d.ts: add window.{register_implementors,pending_implementors}
lolbinarycat Mar 10, 2025
7421546
main.js: typecheck things related to window.register_type_impls
lolbinarycat Mar 10, 2025
2b3b0bd
Remove unused file
randomPoison Mar 10, 2025
20bac26
main.js: remove searchState from globals.
lolbinarycat Mar 10, 2025
c0957ef
naked functions: on windows emit `.endef` without the symbol name
folkertdev Mar 10, 2025
3b0c258
Convert `ShardedHashMap` to use `hashbrown::HashTable`
cuviper Feb 27, 2025
c9c8387
Use `RUSTC_LINT_FLAGS` more.
nnethercote Mar 11, 2025
55505ab
Add `unreachable_pub` to `RUSTC_LINT_FLAGS` for `compiler/` crates.
nnethercote Mar 11, 2025
ff0a5fe
Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.
nnethercote Mar 11, 2025
2a8c87b
Rebuild llvm spuriously less frequently
jyn514 Mar 11, 2025
ff5a8ad
Explain the actual reason why stripping binders is fine
oli-obk Feb 24, 2025
9882eca
Remove some dead code
oli-obk Mar 11, 2025
7475a34
Stabilize `std::io::ErrorKind::InvalidFilename`
GrigorenkoPV Dec 9, 2024
47ba5bd
Enable `f16` tests for `powf`
tgross35 Mar 11, 2025
436959e
Add PeekMut::refresh
HeroicKatora Mar 7, 2025
c170d0f
Elaborate param-env built for checking DispatchFromDyn for dyn compat
compiler-errors Mar 11, 2025
6133999
Fix `cargo vendor` not working without `rustc` installed
ehuss Mar 11, 2025
590b277
Add a test for new 2024 standard library behavior
ehuss Feb 11, 2025
0e071c2
Migrate core to Rust 2024
ehuss Feb 11, 2025
f505d4e
Migrate alloc to Rust 2024
ehuss Feb 11, 2025
b9454af
Migrate panic_abort to Rust 2024
ehuss Feb 11, 2025
985f66b
Migrate panic_unwind to Rust 2024
ehuss Feb 12, 2025
540ef90
Migrate unwind to Rust 2024
ehuss Feb 12, 2025
993359e
Migrate std to Rust 2024
ehuss Feb 12, 2025
f1a9513
Migrate test to Rust 2024
ehuss Feb 12, 2025
0b2489c
Migrate proc_macro to Rust 2024
ehuss Feb 12, 2025
80311c4
Migrate profiler_builtins to Rust 2024
ehuss Feb 12, 2025
32c61f7
Migrated the rustc-std-workspace crates to Rust 2024
ehuss Feb 12, 2025
ba06ce6
Migrate the sysroot crate to Rust 2024
ehuss Feb 12, 2025
b130747
Migrate windows-targets to Rust 2024
ehuss Feb 12, 2025
d3c55cd
Remove unnecessary parens
randomPoison Mar 11, 2025
faa5b3f
Fix false-positive in `expr_or_init` and in the `invalid_from_utf8` lint
Urgau Mar 9, 2025
64d1433
Refactor pick2_mut & pick3_mut to use get_disjoint_mut
Eclips4 Mar 11, 2025
d2642ab
Adjust `Map`'s `to_string` functionality.
nnethercote Feb 21, 2025
281af35
Rename `hir_attrs` query as `hir_attr_map`.
nnethercote Feb 24, 2025
256c27e
Move methods from `Map` to `TyCtxt`, part 4.
nnethercote Feb 21, 2025
763db5d
Convert a delayed bug to a bug.
nnethercote Mar 5, 2025
fe04460
Remove an unnecessary `kw::Empty` check.
nnethercote Mar 6, 2025
0b2d706
Introduce `sym::dummy` and `Ident::dummy`.
nnethercote Mar 4, 2025
4eadaff
Convert a `kw::Empty` occurrence to `sym::dummy`.
nnethercote Mar 11, 2025
7398b39
Make panic's more specific
Eclips4 Mar 11, 2025
576bcfc
Update compiletest's `has_asm_support` to match rustc
cuviper Mar 11, 2025
d7029d7
Remove unused `OwnerNode::ident` method.
nnethercote Mar 7, 2025
ed10418
Inline and remove `State::print_item_type`.
nnethercote Mar 7, 2025
ee9ef82
Factor out some repeated code in `parse_item_impl`.
nnethercote Mar 7, 2025
c0cee43
Remove unnecessary lifetime from `PatInfo`.
nnethercote Jan 30, 2025
fa678e4
Rollup merge of #134076 - GrigorenkoPV:InvalidFilename, r=joboet
jieyouxu Mar 12, 2025
e7472fa
Rollup merge of #136842 - randomPoison:trusty-libstd-v3, r=ChrisDenton
jieyouxu Mar 12, 2025
209cf06
Rollup merge of #137314 - lcnr:cycles-with-unknown-kind, r=compiler-e…
jieyouxu Mar 12, 2025
6872f4f
Rollup merge of #137504 - nnethercote:remove-Map-4, r=Zalathar
jieyouxu Mar 12, 2025
5017577
Rollup merge of #137621 - Berrysoft:cygwin-std, r=joboet
jieyouxu Mar 12, 2025
d6908a7
Rollup merge of #137701 - cuviper:sharded-hashtable, r=fmease
jieyouxu Mar 12, 2025
2d97a21
Rollup merge of #138109 - Kohei316:feat/rust-doc-precise-capturing-ar…
jieyouxu Mar 12, 2025
329b93b
Rollup merge of #138161 - HeroicKatora:heap-peek-mut-refresh, r=dtolnay
jieyouxu Mar 12, 2025
05b4ec8
Rollup merge of #138162 - ehuss:library-2024, r=cuviper
jieyouxu Mar 12, 2025
1ce7e1f
Rollup merge of #138174 - compiler-errors:elaborate-unsize-self-pred,…
jieyouxu Mar 12, 2025
481c31a
Rollup merge of #138175 - sam-mccall:binobj, r=nnethercote
jieyouxu Mar 12, 2025
6a323ba
Rollup merge of #138259 - compiler-errors:disentangle-ribs, r=BoxyUwU
jieyouxu Mar 12, 2025
3ffb74b
Rollup merge of #138269 - Ayush1325:uefi-fs-permission, r=joboet
jieyouxu Mar 12, 2025
529d411
Rollup merge of #138313 - rustbot:docs-update, r=jieyouxu
jieyouxu Mar 12, 2025
156adae
Rollup merge of #138318 - lolbinarycat:rustdoc-js-less-expect-error-p…
jieyouxu Mar 12, 2025
6936771
Rollup merge of #138331 - nnethercote:use-RUSTC_LINT_FLAGS-more, r=on…
jieyouxu Mar 12, 2025
788948a
Rollup merge of #138333 - jyn514:spurious-llvm-rebuilds, r=onur-ozkan
jieyouxu Mar 12, 2025
aecd115
Rollup merge of #138343 - tgross35:f16-powf, r=joboet
jieyouxu Mar 12, 2025
5fe438c
Rollup merge of #138345 - oli-obk:autodiff-cleanup, r=compiler-errors
jieyouxu Mar 12, 2025
82e4741
Rollup merge of #138346 - folkertdev:naked-asm-windows-endef, r=Chris…
jieyouxu Mar 12, 2025
15148c5
Rollup merge of #138347 - nnethercote:less-kw-Empty-2, r=compiler-errors
jieyouxu Mar 12, 2025
f88efac
Rollup merge of #138360 - Urgau:fix-fp-expr_or_init, r=wesleywiser
jieyouxu Mar 12, 2025
a67dd3a
Rollup merge of #138371 - cuviper:stable-asm-test, r=jieyouxu
jieyouxu Mar 12, 2025
c738bb0
Rollup merge of #138372 - Eclips4:issue-138196, r=scottmcm
jieyouxu Mar 12, 2025
666495d
Rollup merge of #138376 - nnethercote:hir-ItemKind-ident-precursors, …
jieyouxu Mar 12, 2025
f54afd9
Rollup merge of #138377 - nnethercote:rustc_hir_typeck, r=compiler-er…
jieyouxu Mar 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
uefi: fs: Implement FileType
- Similar to FilePermissions, using bool to represent the bitfield.
- FileType cannot be changed, so no need to worry about converting back
  to attribute.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
Ayush1325 committed Mar 10, 2025
commit c717cc7cd2e2ce9f3da069abd7781f366a87e64e
40 changes: 10 additions & 30 deletions library/std/src/sys/fs/uefi.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::ffi::OsString;
use crate::fmt;
use crate::hash::{Hash, Hasher};
use crate::hash::Hash;
use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut, SeekFrom};
use crate::path::{Path, PathBuf};
use crate::sys::time::SystemTime;
@@ -27,7 +27,9 @@ pub struct FileTimes {}
// Bool indicates if file is readonly
pub struct FilePermissions(bool);

pub struct FileType(!);
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
// Bool indicates if directory
pub struct FileType(bool);

#[derive(Debug)]
pub struct DirBuilder {}
@@ -95,39 +97,17 @@ impl FileType {
}

pub fn is_file(&self) -> bool {
self.0
!self.is_dir()
}

// Symlinks are not supported in UEFI
pub fn is_symlink(&self) -> bool {
self.0
false
}
}

impl Clone for FileType {
fn clone(&self) -> FileType {
self.0
}
}

impl Copy for FileType {}

impl PartialEq for FileType {
fn eq(&self, _other: &FileType) -> bool {
self.0
}
}

impl Eq for FileType {}

impl Hash for FileType {
fn hash<H: Hasher>(&self, _h: &mut H) {
self.0
}
}

impl fmt::Debug for FileType {
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.0
#[expect(dead_code)]
const fn from_attr(attr: u64) -> Self {
Self(attr & r_efi::protocols::file::DIRECTORY != 0)
}
}