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 15 pull requests #122008

Closed
wants to merge 42 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift click to select a range
1f2db3d
Add an example to demonstrate how Rc::into_inner works
Takashiidobe Feb 17, 2024
cb8ce9d
time complexity for push
20jasper Feb 16, 2024
bb6dca0
time complexity for push_within_capacity
20jasper Feb 16, 2024
0a5d684
time complexity for pop
20jasper Feb 16, 2024
d2f825f
time complexity for insert
20jasper Feb 18, 2024
ef1a584
intradoc link for vec
20jasper Feb 18, 2024
a9cfeb3
fix typo in push documentation
20jasper Feb 18, 2024
bc52e5d
Fix error in push docs
20jasper Feb 18, 2024
261da5f
Clarify/add `must_use` message for Rc/Arc/Weak::into_raw.
zachs18 Feb 19, 2024
74151cb
Make push docs more vague
20jasper Feb 25, 2024
e0a726c
Adjust error yield/await lowering
compiler-errors Feb 27, 2024
91322f4
Limit the number of names and values in check-cfg diagnostics
Urgau Feb 16, 2024
f5f11e1
Add regression test
oli-obk Mar 1, 2024
c3954b3
Add a tidy check that checks whether the fluent slugs only appear once
mu001999 Mar 2, 2024
d88c7ff
Remove unused fluent messages
mu001999 Mar 2, 2024
dd0004a
Don't panic when waiting on poisoned queries
Zoxc Aug 16, 2023
a9a9798
Removing absolute path in proc-macro
sundeep-kokkonda Mar 4, 2024
8364a06
Merge the impl trait in assoc type collector into the opaque type col…
oli-obk Mar 4, 2024
4e03c51
hir_analysis: enums return `None` in `find_field`
davidtwco Mar 4, 2024
640e99c
Fix duplicated path in the "not found dylib" error
GuillaumeGomez Mar 4, 2024
5e6e140
Add regression ui test for duplicated path in dylib error
GuillaumeGomez Mar 4, 2024
2af01a2
Abort on arity mismatch
Nadrieril Mar 4, 2024
fb91610
Avoid using unnecessary queries when printing the query stack in panics
Zoxc Mar 4, 2024
86e88fc
interpret/cast: make more matches on FloatTy properly exhaustive
RalfJung Mar 4, 2024
681dc38
typo
RalfJung Mar 4, 2024
4dbd256
Explain use of display adapters
CAD97 Feb 14, 2024
215a4b6
doc wording improvements
CAD97 Mar 5, 2024
6e85695
Rollup merge of #121065 - CAD97:display-i18n, r=cuviper
jhpratt Mar 5, 2024
7fb3b5e
Rollup merge of #121202 - Urgau:check-cfg-limit-diagnostics, r=pnkfelix
jhpratt Mar 5, 2024
7852ee9
Rollup merge of #121213 - Takashiidobe:takashi/example-for-rc-into-in…
jhpratt Mar 5, 2024
1dcdfb3
Rollup merge of #121262 - 20jasper:add-vector-time-complexity, r=cuviper
jhpratt Mar 5, 2024
f5d4a5d
Rollup merge of #121287 - zachs18:rc-into-raw-must-use, r=cuviper
jhpratt Mar 5, 2024
b4245e1
Rollup merge of #121664 - compiler-errors:adjust-error-yield-lowering…
jhpratt Mar 5, 2024
c850191
Rollup merge of #121838 - oli-obk:impl_trait_in_assoc_tys_fix, r=comp…
jhpratt Mar 5, 2024
1938ec0
Rollup merge of #121860 - mu001999:master, r=Nilstrieb
jhpratt Mar 5, 2024
0a6b60b
Rollup merge of #121913 - Zoxc:query-fix, r=compiler-errors
jhpratt Mar 5, 2024
8698b24
Rollup merge of #121959 - sundeep-kokkonda:patch-2, r=davidtwco
jhpratt Mar 5, 2024
d03f11d
Rollup merge of #121975 - davidtwco:issue-121757, r=petrochenkov
jhpratt Mar 5, 2024
a6ef0cc
Rollup merge of #121978 - GuillaumeGomez:dylib-duplicated-path, r=bjorn3
jhpratt Mar 5, 2024
425caf7
Rollup merge of #121987 - Nadrieril:abort-on-arity-mismatch, r=compil…
jhpratt Mar 5, 2024
ac4eb31
Rollup merge of #121993 - Zoxc:query-stack-panic-queries, r=compiler-…
jhpratt Mar 5, 2024
4a65a53
Rollup merge of #121997 - RalfJung:cast-float-ty, r=compiler-errors
jhpratt Mar 5, 2024
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
time complexity for insert
  • Loading branch information
20jasper committed Feb 18, 2024
commit d2f825f26127f71cd853c602818452c8be876ea8
6 changes: 6 additions & 0 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 1490,12 @@ impl<T, A: Allocator> Vec<T, A> {
/// vec.insert(4, 5);
/// assert_eq!(vec, [1, 4, 2, 3, 5]);
/// ```
///
/// # Time complexity
///
/// Takes *O*(`len`) time. All items after the insertion index must be
/// shifted to the right. In the worst case, all elements are shifted when
/// the insertion index is 0.
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn insert(&mut self, index: usize, element: T) {
Expand Down